Browse Source

Make sourcemaps on `npm run watch` optional

Sourcemaps can be enabled by either setting the `SOURCEMAP` environment variable
to `true` (works for `npm run build` too) or running `npm run watch:sourcemap`
master
Jonas Gierer 7 years ago
parent
commit
ffe599b8ba
No known key found for this signature in database GPG Key ID: 38AEE784A8156E18
  1. 4
      package.json
  2. 3
      rollup.config.js

4
package.json

@ -5,7 +5,8 @@
"scripts": {
"test": "xo && ava && npm run build",
"build": "rollup -c",
"watch": "run-p --continue-on-error --silent \"build -- --watch --sourcemap\"",
"watch": "run-p --continue-on-error --silent \"build -- --watch\"",
"watch:sourcemap": "cross-env SOURCEMAP=true run-p \"watch\"",
"release:amo": "cd extension && webext submit",
"release:cws": "cd extension && webstore upload --auto-publish",
"release": "run-s release:*"
@ -29,6 +30,7 @@
"ava": "*",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"chrome-webstore-upload-cli": "^1.0.0",
"cross-env": "^5.0.1",
"npm-run-all": "^4.0.2",
"rollup": "^0.43.0",
"rollup-watch": "^4.0.0",

3
rollup.config.js

@ -14,5 +14,6 @@ export default [
}),
commonJS()
],
format: 'iife'
format: 'iife',
sourceMap: process.env.SOURCEMAP || false
}));

Loading…
Cancel
Save