Skip to content

Commit

Permalink
[pkg] Improve build script
Browse files Browse the repository at this point in the history
Split the build script into two separate tasks and generate a
source map.
  • Loading branch information
lpinca committed Apr 9, 2018
1 parent 302165d commit a053f61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"build": "mkdir -p umd && browserify index.js -s EventEmitter3 | uglifyjs -cm -o umd/eventemitter3.min.js",
"browserify": "rm -rf umd && mkdir umd && browserify index.js -s EventEmitter3 -o umd/eventemitter3.js",
"minify": "uglifyjs umd/eventemitter3.js --source-map -cm -o umd/eventemitter3.min.js",
"benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
"test": "nyc --reporter=html --reporter=text mocha test/test.js",
"test-browser": "node test/browser.js",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run browserify && npm run minify",
"test-browser": "node test/browser.js"
},
"files": [
"index.js",
Expand Down

0 comments on commit a053f61

Please sign in to comment.