From ed2e6e8a97b235ea199a2138ca44e8a4c7bd4312 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Fri, 12 Jul 2019 19:14:49 -0700 Subject: [PATCH] - npm: Rename `build-config` to `build-by-config` --- README.md | 2 +- docs/versions/3.0.0.md | 13 +++++++------ package.json | 6 +++--- svgedit-config-es.js | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d582e43e..572f1a84 100644 --- a/README.md +++ b/README.md @@ -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 repository directory if you cloned the Git repository instead. 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. 1. This will rebuild `svgedit-config-iife.js` (applying Babel to allow it to work on older browsers and applying Rollup to build diff --git a/docs/versions/3.0.0.md b/docs/versions/3.0.0.md index cb5cc885..be5a7c8e 100644 --- a/docs/versions/3.0.0.md +++ b/docs/versions/3.0.0.md @@ -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 of the SVG codebase. -The build routines include `npm run build-config` to convert the -JavaScript config to non-modular form, `npm run rollup` to convert the other -source files to non-modular form, and `npm run build-html` to build the -non-modular HTML out of the modular HTML (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`). +The build routines include `npm run build-config` (renamed in 5.0 to +`build-by-config`) to convert the JavaScript config to non-modular form +(including the main svgedit application code which the config files import), +`npm run rollup` to convert the other source files to non-modular form, and +`npm run build-html` to build the non-modular HTML out of the modular HTML +(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 diff --git a/package.json b/package.json index f98df878..733f00c8 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "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", "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", @@ -26,8 +26,8 @@ "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": "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-prep": "npm run eslint && npm run build-html && npm run rollup && npm run build-config", + "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-by-config", "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" }, diff --git a/svgedit-config-es.js b/svgedit-config-es.js index 1511c4e2..20bf26c6 100644 --- a/svgedit-config-es.js +++ b/svgedit-config-es.js @@ -1,6 +1,6 @@ // 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: -// `npm run build-config`. REPEAT AFTER ANY MODIFICATIONS +// `npm run build-by-config`. REPEAT AFTER ANY MODIFICATIONS // TO svgedit-config-es.js. /*