npm : Use npm-run-all for fewer race conditions and shorter scripts
This commit is contained in:
21
package.json
21
package.json
@@ -15,14 +15,17 @@
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run prep",
|
||||
"build-by-config": "rollup -c rollup-config.config.js",
|
||||
"open-es-allext": "open-cli http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js && npm start",
|
||||
"open": "open-cli http://localhost:8000/editor/svg-editor-es.html && npm start",
|
||||
"open-es-allext-no-start": "open-cli http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js",
|
||||
"open-es-allext": "run-p start open-es-allext-no-start",
|
||||
"open-no-start": "open-cli http://localhost:8000/editor/svg-editor-es.html",
|
||||
"open": "run-p start open-no-start",
|
||||
"build-docs-remove": "rimraf \"docs/jsdoc/*\"",
|
||||
"build-docs-create": "jsdoc --pedantic -c docs/jsdoc-config.js editor",
|
||||
"build-docs": "run-s -c build-docs-remove build-docs-create",
|
||||
"open-docs": "open-cli http://localhost:8000/docs/jsdoc/ && npm start",
|
||||
"open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/",
|
||||
"open-docs": "run-p start open-docs-no-start",
|
||||
"build-html": "npx babel-node --plugins @babel/plugin-transform-modules-commonjs build-html.js",
|
||||
"compress-images": "imageoptim \"chrome-app/*.png\" && imageoptim \"editor/extensions/*.png\" && imageoptim \"editor/spinbtn/*.png\" && imageoptim \"editor/jgraduate/images/*.{png,gif}\" && imageoptim \"editor/images/*.png\"",
|
||||
"compress-images": "imageoptim \"chrome-app/*.png\" \"editor/extensions/*.png\" \"editor/spinbtn/*.png\" \"editor/jgraduate/images/*.{png,gif}\" \"editor/images/*.png\"",
|
||||
"copy": "copyfiles -f node_modules/load-stylesheets/dist/index-es.js editor/external/load-stylesheets && copyfiles -f node_modules/jamilih/dist/jml-es.js editor/external/jamilih && copyfiles -f node_modules/query-result/esm/index.js editor/external/query-result/esm && copyfiles -f node_modules/qr-manipulation/dist/index-es.js editor/external/qr-manipulation/dist && copyfiles -f node_modules/stackblur-canvas/dist/stackblur-es.js editor/external/stackblur-canvas/dist && copyfiles -f node_modules/regenerator-runtime/runtime.js editor/external/regenerator-runtime && copyfiles -f \"node_modules/core-js-bundle//minified*\" editor/external/core-js-bundle && copyfiles -f \"node_modules/underscore/underscore-*\" editor/jspdf",
|
||||
"remark": "remark -q -f .",
|
||||
"eslint-fix": "eslint --fix --ext js,md,html .",
|
||||
@@ -32,8 +35,10 @@
|
||||
"start-embedded": "echo \"Open file to http://localhost:8000/editor/embedapi.html\" && run-p start start-allow-origin",
|
||||
"start": "echo \"Open file, e.g., to http://localhost:8000/editor/svg-editor-es.html\" && static -p 8000",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run && npm run coverage-badge",
|
||||
"open-report": "open-cli http://localhost:8000/coverage/ && npm start",
|
||||
"cypress:run-no-badge": "cypress run",
|
||||
"cypress:run": "run-s cypress:run-no-badge coverage-badge",
|
||||
"open-report-no-start": "open-cli http://localhost:8000/coverage/",
|
||||
"open-report": "run-p start open-report-no-start",
|
||||
"start-open-report": "run-p start open-report",
|
||||
"instrument:replace-html": "frs-replace \"../svgedit-config-es.js\" \"svgedit-config-es.js\" -i instrumented/svg-editor-es.html -o instrumented/svg-editor-es.html",
|
||||
"instrument:replace-js": "frs-replace \"editor/svg-editor.js\" \"svg-editor.js\" -i svgedit-config-es.js -o instrumented/svgedit-config-es.js",
|
||||
@@ -48,8 +53,8 @@
|
||||
"test-cov-prereport": "npm-run-all instrument --parallel --race start cypress:run",
|
||||
"test-cov": "run-s -c test-cov-prereport report-summary",
|
||||
"test-cov-open": "npm-run-all instrument --parallel --race start cypress:run",
|
||||
"test-no-build": "npm run eslint && npm run build-html && npm run build-by-config && npm test",
|
||||
"prep": "npm run eslint && npm run build-html && npm run rollup && npm run build-by-config",
|
||||
"test-no-build": "run-s eslint build-html build-by-config && npm test",
|
||||
"prep": "run-s eslint build-html rollup build-by-config",
|
||||
"test": "run-p start cypress:run"
|
||||
},
|
||||
"nyc": {
|
||||
|
||||
Reference in New Issue
Block a user