Prebuild support (#20)

* Add prebuild support

* Add prebuild-install support

* Add repository field to package.json
This commit is contained in:
Stafford Brunk 2018-07-22 12:13:32 -06:00 committed by Max Brunsfeld
parent 9c446b3d70
commit 5f6591e1ac
3 changed files with 36 additions and 5 deletions

View File

@ -5,10 +5,18 @@ sudo: false
node_js: node_js:
- 8 - 8
compiler: clang-3.6 os:
- linux
env: matrix:
- CXX=clang-3.6 include:
- os: osx
env: COMPILER=clang++
osx_image: xcode9.2
compiler: clang
- os: linux
env: CXX=clang-3.6
compiler: clang-3.6
addons: addons:
apt: apt:
@ -17,3 +25,16 @@ addons:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
packages: packages:
- clang-3.6 - clang-3.6
branches:
only:
- master
- /^v.*$/
deploy:
provider: script
script: npm run prebuild && npm run prebuild:upload -u ${PREBUILD_UPLOAD}
skip_cleanup: true
on:
all_branches: true
tags: true

View File

@ -5,6 +5,7 @@ environment:
platform: platform:
- x64 - x64
- x86
install: install:
- ps: Install-Product node $env:nodejs_version - ps: Install-Product node $env:nodejs_version
@ -20,3 +21,6 @@ build: off
branches: branches:
only: only:
- master - master
- /^v.*$/
deploy_script: IF "%APPVEYOR_REPO_TAG%" == "true" (npm run prebuild && npm run prebuild:upload -u %PREBUILD_UPLOAD%)

View File

@ -10,14 +10,20 @@
"author": "Max Brunsfeld", "author": "Max Brunsfeld",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"nan": "^2.10.0" "nan": "^2.10.0",
"prebuild-install": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
"prebuild": "^7.6.1",
"tree-sitter-cli": "^0.13.1" "tree-sitter-cli": "^0.13.1"
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",
"install": "prebuild-install || node-gyp rebuild",
"prebuild": "prebuild --all --strip --verbose",
"prebuild:upload": "prebuild --upload-all",
"test": "tree-sitter test && script/parse-examples.sh", "test": "tree-sitter test && script/parse-examples.sh",
"test-windows": "tree-sitter test" "test-windows": "tree-sitter test"
} },
"repository": "https://github.com/tree-sitter/tree-sitter-bash"
} }