From 6f15e6755accbb1a4c29959893178d23ba994802 Mon Sep 17 00:00:00 2001 From: Lewis Van Winkle Date: Thu, 20 Apr 2017 22:48:17 -0500 Subject: [PATCH] trying out node-pre-gyp --- .gitignore | 4 ++++ appveyor.yml | 41 +++++++++++++++++++++++++++++++++++++++++ binding.gyp | 3 ++- example.js | 3 +-- index.js | 6 ++++-- package.json | 23 ++++++++++++++++++++--- test.js | 23 +++++++++++++++++++++++ 7 files changed, 95 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 appveyor.yml create mode 100644 test.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ebc49b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.node_pre_gyprc +node_modules +build +lib diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..cd87413 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +environment: + node_pre_gyp_accessKeyId: + secure: GOBrUyHVMfZSrmsS4I63fC+E3qploEcIuQc/ofuTK5U= + + node_pre_gyp_secretAccessKey: + secure: QBSKf6NBLUrjkk7ft4H8LyxATdcJ8PmQObKqDgl1qQmT0ju7r3l/D6t8MN2joQqk + + matrix: + - nodejs_version: 4 + - nodejs_version: 5 + - nodejs_version: 6 + - nodejs_version: 7 + +platform: + - x64 + - x86 + +shallow_clone: true + +install: + - ps: Install-Product node $env:nodejs_version $env:Platform + - ps: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force + - npm install --global --production npm-windows-upgrade + - npm-windows-upgrade --npm-version 2.15.9 --no-dns-check --no-prompt + - node --version + - npm --version + - node -e "console.log(process.arch);" + - IF /I "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH% + - IF /I "%PLATFORM%" == "x86" SET PATH=C:\python27;%PATH% + - IF /I "%PLATFORM%" == "x64" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 + - IF /I "%PLATFORM%" == "x86" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + - npm install --build-from-source + - npm test + - npm ls + - SET PATH=node_modules\.bin;%PATH% + - node-pre-gyp package publish + + +build: off +test: off +deploy: off diff --git a/binding.gyp b/binding.gyp index a79f369..555201e 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,7 +1,8 @@ { "targets": [ { - "target_name": "tulind", + "target_name": "<(module_name)", + "product_dir": "<(module_path)", "sources": ["tulind.cpp", "tiamalgamation.c"], "include_dirs": [ "