Skip to content

Commit

Permalink
feat: structure scripts + parcel script
Browse files Browse the repository at this point in the history
Use separate js and native prefixes for the scripts.

Use prepare and prepublishOnly
  • Loading branch information
aminya committed Sep 2, 2020
1 parent 9e5cb74 commit ddc4881
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
"description": "Fuzzaldrin plus - fast using native c bindings",
"main": "dist/fuzzaldrin.js",
"scripts": {
"prepare": "node-gyp-build",
"prebuild": "prebuildify --napi",
"native:clean": "shx rm -rf build",
"native:build": "node-gyp-build",
"native:prebuild": "prebuildify --napi",
"js:clean": "shx rm -rf 'dist' '.parcel-cache'",
"js:dev": "cross-env NODE_ENV=development parcel watch --target main fuzzaldrin.coffee",
"js:build": "cross-env NODE_ENV=production parcel build --target main fuzzaldrin.coffee",
"clean": "npm run native:clean && npm run js:clean",
"build": "npm run native:build && npm run js:build",
"test": "jasmine-node --coffee --captureExceptions spec",
"benchmark": "coffee benchmark/benchmark.coffee",
"benchmarklarge": "coffee benchmark/benchmark-large.coffee",
"benchmarksmall": "node benchmark/benchmark-small.js",
"bump": "ncu -u",
"prepublishOnly": "npm run prebuild"
"prepare": "npm run build",
"prepublishOnly": "npm run native:prebuild && npm run js:build"
},
"gypfile": true,
"targets": {
Expand Down

0 comments on commit ddc4881

Please sign in to comment.