Skip to content

Commit 7cb4962

Browse files
committedFeb 3, 2016
Improved the browser build
Made three improvements to the browser build: 1. It now builds _two_ browser bundles, one minified (49kb) and one unminified (129kb) 2. It now builds source maps, which makes debugging in a browser easier 3. `npm start` now runs with `--watch`, so it automatically does _fast_ differential rebuilds when any source files change
1 parent febebbd commit 7cb4962

5 files changed

+311
-5
lines changed
 

‎dist/chai-http.js

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/chai-http.js.map

+67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/chai-http.min.js

+166
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/chai-http.min.js.map

+67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
},
2222
"scripts": {
2323
"build": "npm run build:readme && npm run build:js",
24-
"prebuild:js": "mkdir -p dist",
25-
"build:js": "browserify lib/http.js --outfile dist/chai-http.js --standalone chaiHttp",
24+
"prebuild:js": "rm -rf dist",
25+
"build:js": "simplifyify lib/http.js --outfile dist/chai-http.js --bundle --minify --debug --standalone chaiHttp",
2626
"build:readme": "rm -rf README.md && node ./support/readme",
27-
"start": "npm run build && http-server -c-1",
27+
"start": "npm run build -- --watch & http-server -o -c-1",
2828
"test": "istanbul cover --report lcovonly _mocha",
2929
"posttest": "if [ -z \"$COVERALLS_REPO_TOKEN\" ]; then cat coverage/lcov.info | coveralls; fi"
3030
},
@@ -42,7 +42,7 @@
4242
"superagent": "1.2.x"
4343
},
4444
"devDependencies": {
45-
"browserify": "*",
45+
"simplifyify": "^2.0.1",
4646
"chai": "*",
4747
"coveralls": "^2.11.6",
4848
"dox": "*",

0 commit comments

Comments
 (0)
Please sign in to comment.