diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..391b38d --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +.travis.yml +appveyor.yml +test.bat diff --git a/.travis.yml b/.travis.yml index c03bb05..bc1baf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,3 @@ env: global: - secure: ER5LYPXeYbQz8IH7IFlEOdiUFhQZ/he6MBiKgAQlUEaY+aF48Ypd9FaXue0R6OPxqBoTVA6rFixdiAZk7U0wB9wTzyABWWUBEmFO7WMbDWfFp4cOTbtHGQREBotYv0vaC8L+qgRDqtM0ASGm8/i8duRM1ICQ7n3N01ezAlMTu8I= - secure: hlJfOM3VG9xYFQ+TrGWgIc5H2zowRGJBtIm710Mg5JQ4F6tpz7wzIZ+MpynGOklD8ltuLhUUSmf+doejVzCiRRADqF2ubjTRWafyqfz8p5nESz0ovw4g+rQuOOt3S4FbmKiHCZtoYEqn1N47GIaN06ucakK+rvS2DANgpSwOLPI= -cache: - directories: - - node_modules diff --git a/README.md b/README.md index c44d0a7..5ccb820 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ npm test bson-ext uses [node-pre-gyp](http://npm.im/node-pre-gyp) to publish and install prebuilt binaries. This means you don't need the full toolchain installed -and configured correctly to use this module. +and configured correctly to use this module. ## License diff --git a/appveyor.yml b/appveyor.yml index dcec48e..d59d08a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ environment: matrix: - nodejs_version: 0.10 - nodejs_version: 0.12 - - nodejs_version: 1.x + - nodejs_version: "1" platform: - x86 @@ -16,19 +16,9 @@ platform: install: - ps: Install-Product node $env:nodejs_version - - npm install --build-from-source + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) test_script: - - node --version - - npm --version - - npm test - -matrix: - fast_finish: true - -cache: - - C:\Users\appveyor\AppData\Roaming\npm\node_modules -> package.json # global npm modules - - C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache - - node_modules -> package.json # local npm modules + - .\test.bat build: OFF diff --git a/binding.gyp b/binding.gyp index c4455e7..91ca717 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,6 +1,7 @@ { 'targets': [ { + 'win_delay_load_hook': 'true', 'target_name': 'bson', 'sources': [ 'ext/bson.cc' ], 'cflags!': [ '-fno-exceptions' ], @@ -11,6 +12,17 @@ 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' } + }], + ['OS=="win"', { + 'configurations': { + 'Release': { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'ExceptionHandling': 1 + } + } + } + } }] ] } diff --git a/package.json b/package.json index b17b55a..b1c36f9 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,15 @@ }, "dependencies": { "nan": "~1.7.0", - "node-pre-gyp": "mongodb-js/node-pre-gyp" + "node-pre-gyp": "https://github.com/mongodb-js/node-pre-gyp/archive/v0.6.5-appveyor.tar.gz" }, + "bundledDependecies": [ + "node-pre-gyp" + ], "devDependencies": { "aws-sdk": "~2.1.20", "nodeunit": "~0.9.0" }, - "bundledDependencies": [ - "node-pre-gyp" - ], "main": "./index", "directories": { "lib": "./lib/bson" diff --git a/scripts/test.bat b/scripts/test.bat new file mode 100644 index 0000000..596bb3c --- /dev/null +++ b/scripts/test.bat @@ -0,0 +1,10 @@ +call node --version +call npm --version +SET GYP_MSVS_VERSION=2013 +SET PATH=%PATH%;%APPDATA%\npm +SET PATH=%PATH%;C:\Program Files (x86)\Git\bin +SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin +call npm install https://github.com/mongodb-js/node-pre-gyp/archive/v0.6.5-appveyor.tar.gz +call npm install https://github.com/mongodb-js/node-gyp/archive/v1.04-appveyor.tar.gz +call npm install --build-from-source +call npm test