- npm: Rename build-config to build-by-config

This commit is contained in:
Brett Zamir
2019-07-12 19:14:49 -07:00
parent 9b8635e9d0
commit ed2e6e8a97
4 changed files with 12 additions and 11 deletions

View File

@@ -109,7 +109,7 @@ incorporating SVGEdit. You will need to have Node.js/npm installed.
(`node_modules/svgedit` if you installed via npm) and the root (`node_modules/svgedit` if you installed via npm) and the root
repository directory if you cloned the Git repository instead. repository directory if you cloned the Git repository instead.
This will install the build tools for SVG-edit. This will install the build tools for SVG-edit.
1. Run `npm run build-config` within the svgedit directory mentioned 1. Run `npm run build-by-config` within the svgedit directory mentioned
in the step above. in the step above.
1. This will rebuild `svgedit-config-iife.js` (applying Babel to 1. This will rebuild `svgedit-config-iife.js` (applying Babel to
allow it to work on older browsers and applying Rollup to build allow it to work on older browsers and applying Rollup to build

View File

@@ -96,12 +96,13 @@ JavaScript, you will be required to directly modify your config within
the large non-modular, bundled JavaScript config file that includes most the large non-modular, bundled JavaScript config file that includes most
of the SVG codebase. of the SVG codebase.
The build routines include `npm run build-config` to convert the The build routines include `npm run build-config` (renamed in 5.0 to
JavaScript config to non-modular form, `npm run rollup` to convert the other `build-by-config`) to convert the JavaScript config to non-modular form
source files to non-modular form, and `npm run build-html` to build the (including the main svgedit application code which the config files import),
non-modular HTML out of the modular HTML (all of these are run during `npm run rollup` to convert the other source files to non-modular form, and
`npm run test-prep`, or if you want to run the tests, also as a part of `npm run build-html` to build the non-modular HTML out of the modular HTML
`npm test` and `npm run browser-test`). (all of these are run during `npm run test-prep`, or if you want to run the
tests, also as a part of `npm test` and `npm run browser-test`).
#### Stylesheet breaking changes #### Stylesheet breaking changes

View File

@@ -14,7 +14,7 @@
}, },
"scripts": { "scripts": {
"prepublishOnly": "npm run test-prep", "prepublishOnly": "npm run test-prep",
"build-config": "rollup -c rollup-config.config.js", "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", "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",
"build-docs": "rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.js editor", "build-docs": "rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.js editor",
"open-docs": "open-cli http://localhost:8000/docs/jsdoc/ && npm start", "open-docs": "open-cli http://localhost:8000/docs/jsdoc/ && npm start",
@@ -26,8 +26,8 @@
"rollup": "rollup -c", "rollup": "rollup -c",
"start-embedded": "echo \"Open file to http://localhost:8000/editor/embedapi.html\" && static -p 8000 | static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'", "start-embedded": "echo \"Open file to http://localhost:8000/editor/embedapi.html\" && static -p 8000 | static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start": "echo \"Open file to http://localhost:8000/test/all_tests.html\" && static -p 8000", "start": "echo \"Open file to http://localhost:8000/test/all_tests.html\" && static -p 8000",
"test-no-build": "npm run eslint && npm run build-html && npm run build-config && open-cli http://localhost:8000/test/all_tests.html && static -p 8000", "test-no-build": "npm run eslint && npm run build-html && npm run build-by-config && open-cli http://localhost:8000/test/all_tests.html && static -p 8000",
"test-prep": "npm run eslint && npm run build-html && npm run rollup && npm run build-config", "test-prep": "npm run eslint && npm run build-html && npm run rollup && npm run build-by-config",
"test": "testcafe chrome test/ui-tests/**/*.js --skip-js-errors", "test": "testcafe chrome test/ui-tests/**/*.js --skip-js-errors",
"browser-test": "npm run test-prep && open-cli http://localhost:8000/test/all_tests.html && static -p 8000" "browser-test": "npm run test-prep && open-cli http://localhost:8000/test/all_tests.html && static -p 8000"
}, },

View File

@@ -1,6 +1,6 @@
// TO BUILD AN IIFE VERSION OF THIS FILE (AS CAN WORK ON OLDER BROWSERS), // TO BUILD AN IIFE VERSION OF THIS FILE (AS CAN WORK ON OLDER BROWSERS),
// RUN THE FOLLOWING ON THE COMMAND LINE FROM THE PROJECT ROOT: // RUN THE FOLLOWING ON THE COMMAND LINE FROM THE PROJECT ROOT:
// `npm run build-config`. REPEAT AFTER ANY MODIFICATIONS // `npm run build-by-config`. REPEAT AFTER ANY MODIFICATIONS
// TO svgedit-config-es.js. // TO svgedit-config-es.js.
/* /*