- Docs: Update testing info; update CHANGES
- `editorconfig`: Use 4 spaces for Markdown - npm: Rename and group various development scripts
This commit is contained in:
92
package.json
92
package.json
@@ -13,52 +13,74 @@
|
||||
"node": ">=8.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run prep",
|
||||
"open-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-allext": "run-p start open-allext-no-start",
|
||||
"open-no-start": "open-cli http://localhost:8000/editor/svg-editor-es.html",
|
||||
"open": "run-p start open-no-start",
|
||||
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
|
||||
"start-embedded": "run-p start start-allow-origin",
|
||||
"start": "echo \"Open file, e.g., to http://localhost:8000/editor/svg-editor-es.html\" && static -p 8000",
|
||||
|
||||
"open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/",
|
||||
"open-docs": "run-p start open-docs-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-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/build-html.js",
|
||||
"compress-images": "imageoptim \"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 && copyfiles -f \"node_modules/deparam/dist/deparam.esm.js\" editor/external/deparam",
|
||||
"remark": "remark -q -f .",
|
||||
"eslint-fix": "eslint --fix --ext js,md,html .",
|
||||
"eslint": "eslint --ext js,md,html .",
|
||||
"rollup": "rollup -c",
|
||||
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
|
||||
"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:merge": "mochawesome-merge \"cypress/results/mochaw*.json\" > mochawesome.json && marge mochawesome.json && mbg --file ./mochawesome.json --badge_output badges/tests-badge.svg",
|
||||
"cypress:run-only": "rimraf \"cypress/results/mochaw*.json\" && rimraf \".nyc_output/*\" && cypress run",
|
||||
"cypress:run-no-badge": "run-s -c cypress:run-only cypress:merge",
|
||||
"cypress:run": "run-s -c 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",
|
||||
"build-and-open-docs-no-start": "run-s build-docs open-docs-no-start",
|
||||
"build-and-open-docs": "run-s build-docs open-docs",
|
||||
|
||||
"open-embedded-no-start": "open-cli http://localhost:8000/editor/embedapi.html",
|
||||
"open-embedded": "run-p start-embedded open-embedded-no-start",
|
||||
"open-all-ext-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-all-ext": "run-p start open-all-ext-no-start",
|
||||
"open-compiled-no-start": "open-cli http://localhost:8000/editor/svg-editor.html",
|
||||
"open-compiled": "run-p start open-compiled-no-start",
|
||||
"open-no-start": "open-cli http://localhost:8000/editor/svg-editor-es.html",
|
||||
"open": "run-p start open-no-start",
|
||||
|
||||
"open-cov-no-start": "open-cli http://localhost:8000/coverage/",
|
||||
"open-cov": "run-p start open-cov-no-start",
|
||||
|
||||
"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",
|
||||
"instrument:copy-excluded": "node cypress/support/copy.js",
|
||||
"copy-instrumented": "copyfiles -e \"**/*.js\" -u 1 \"editor/**/*\" instrumented && npm run instrument:replace-html && npm run instrument:replace-js && npm run instrument:copy-excluded",
|
||||
"instrument": "rimraf instrumented && npx nyc instrument editor instrumented && npm run copy-instrumented",
|
||||
"instrument": "rimraf instrumented && nyc instrument editor instrumented && npm run copy-instrumented",
|
||||
|
||||
"report": "nyc report",
|
||||
"report-summary": "nyc report --reporter=text-summary",
|
||||
|
||||
"license-badge": "license-badger --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
|
||||
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
|
||||
"license-badges": "run-p license-badge license-badge-dev",
|
||||
"coverage-badge": "coveradge badges/coverage-badge",
|
||||
"open-cov": "run-p --race start cypress:open",
|
||||
"open-tests": "run-p start cypress:open",
|
||||
"report": "npx nyc report",
|
||||
"report-summary": "npx nyc report --reporter=text-summary",
|
||||
|
||||
"compress-images": "imageoptim \"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 && copyfiles -f \"node_modules/deparam/dist/deparam.esm.js\" editor/external/deparam",
|
||||
"remark": "remark -q -f .",
|
||||
|
||||
"build-html": "babel-node --plugins @babel/plugin-transform-modules-commonjs build/build-html.js",
|
||||
"eslint-fix": "eslint --fix --ext js,md,html .",
|
||||
"eslint": "eslint --ext js,md,html .",
|
||||
"rollup": "rollup -c",
|
||||
|
||||
"build-by-config": "rollup -c rollup-config.config.js",
|
||||
"test-cov-open": "run-p --race start cypress:run",
|
||||
"test-cov": "run-s -c instrument test-cov-open report-summary",
|
||||
"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"
|
||||
"prep-no-core-rollup": "run-s eslint build-html build-by-config",
|
||||
"prep": "run-s prep-no-core-rollup rollup",
|
||||
"prepublishOnly": "npm run prep",
|
||||
|
||||
"cypress:open-no-start": "cypress open",
|
||||
"cypress:open": "run-p start cypress:open-no-start",
|
||||
"open-tests": "npm run cypress:open",
|
||||
|
||||
"cypress:merge": "mochawesome-merge \"cypress/results/mochaw*.json\" > mochawesome.json && marge mochawesome.json && mbg --file ./mochawesome.json --badge_output badges/tests-badge.svg",
|
||||
"cypress:run-only": "rimraf \"cypress/results/mochaw*.json\" && rimraf \".nyc_output/*\" && cypress run",
|
||||
"cypress:run-no-badge": "run-s -c cypress:run-only cypress:merge",
|
||||
"cypress:run": "run-s -c cypress:run-no-badge coverage-badge",
|
||||
"test-only-no-report": "run-p start cypress:run",
|
||||
|
||||
"test-only": "run-s -c test-only-no-report report",
|
||||
"test-no-cov-no-core-rollup": "run-s prep-no-core-rollup test-only",
|
||||
"test-no-cov": "run-s prep test-only",
|
||||
"test-no-core-rollup": "run-s instrument test-no-cov-no-core-rollup",
|
||||
"test": "run-s instrument test-no-cov"
|
||||
},
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
|
||||
Reference in New Issue
Block a user