Skip to content

Commit

Permalink
Merge pull request #34 from parcel-bundler/publish-prebuilds
Browse files Browse the repository at this point in the history
Publish prebuilds to npm
  • Loading branch information
DeMoorJasper committed Jun 19, 2020
2 parents f0336b6 + 7f54c8a commit d79a335
Show file tree
Hide file tree
Showing 5 changed files with 319 additions and 2,227 deletions.
13 changes: 6 additions & 7 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ jobs:
- script: npm run prebuild
displayName: Test prebuild

- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
condition: and(succeeded(), eq(variables['publish_artifacts'], 'true'))
inputs:
artifactName: prebuilds
pathtoPublish: '$(System.DefaultWorkingDirectory)/prebuilds'
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
condition: and(succeeded(), eq(variables['publish_artifacts'], 'true'))
inputs:
artifactName: prebuilds
pathtoPublish: '$(System.DefaultWorkingDirectory)/prebuilds'
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
inputs:
gitHubConnection: parcel
repositoryName: parcel-bundler/watcher
assets: $(System.DefaultWorkingDirectory)/prebuilds/@parcel/*
assets: $(System.DefaultWorkingDirectory)/prebuilds/*
- task: Npm@1
displayName: NPM Release
inputs:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const binding = require('bindings')('watcher.node');
const binding = require('node-gyp-build')(__dirname);
const path = require('path');

function normalizeOptions(dir, opts = {}) {
Expand Down
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@
"type": "git",
"url": "https://github.com/parcel-bundler/watcher.git"
},
"files": [
"src",
"prebuilds",
"index.js",
"package.json",
"binding.gyp",
"README.md"
],
"scripts": {
"install": "prebuild-install -r napi || node-gyp rebuild",
"prebuild": "prebuild -t 3 -r napi --strip",
"prebuild": "prebuildify --napi --strip --tag-libc -t 10.0.0",
"format": "prettier --write \"./**/*.{js,json,md}\"",
"install": "node-gyp-build",
"rebuild": "node-gyp rebuild --debug",
"test": "mocha"
},
"engines": {
Expand All @@ -27,17 +36,16 @@
]
},
"dependencies": {
"bindings": "^1.5.0",
"lint-staged": "^10.0.8",
"node-addon-api": "^1.6.2",
"prebuild-install": "^5.2.5"
"node-addon-api": "^3.0.0",
"node-gyp-build": "^4.2.1"
},
"devDependencies": {
"husky": "^4.2.3",
"fs-extra": "^7.0.1",
"husky": "^4.2.3",
"mocha": "^6.0.2",
"prebuild": "^8.2.1",
"prettier": "^1.19.1"
"prettier": "^1.19.1",
"prebuildify": "^4.0.0"
},
"binary": {
"napi_versions": [
Expand Down

0 comments on commit d79a335

Please sign in to comment.