- Update: Copy of core-js and qr-manipulation

- npm: Add `underscore` to copy script
- npm: Make `copy`, `compress-images`, `start-embedded`, `build-docs-remove`
  scripts cross-platform; add `start-allow-origin` script
- npm: Update devDeps/`package-lock.json`
master
Brett Zamir 2019-12-27 07:32:39 +08:00
parent 1d590400f4
commit eb4401e998
8 changed files with 2105 additions and 3656 deletions

6
.ncurc.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
"reject": [
// Old copy with jspdf which needs updating: https://github.com/SVG-Edit/svgedit/issues/51
"underscore"
]
};

View File

@ -23,6 +23,9 @@
- Testing: Create test utilities for selecting English and visiting and
approving storage
- Docs: Remove outdated info on jsdoc linting (now just part of eslint config)
- npm: Add `underscore` to copy script
- npm: Make `copy`, `compress-images`, `start-embedded`, `build-docs-remove`
scripts cross-platform; add `start-allow-origin` script
- npm: Rename open script to open-tests, and add `open` script for opening
instance of svgedit
- npm: Ensure starting server for open scripts
@ -31,6 +34,7 @@
- npm: Update scripts to reflect removal of `all_tests.html`;
remove `browser-test` script
- npm: Rename `test-prep` to `prep`
- npm: Update `package-lock.json`
- npm: Update devDeps, peerDeps
## 5.1.0

View File

@ -2739,6 +2739,10 @@
}
function _iterableToArrayLimit$2(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = [];
var _n = true;
var _d = false;
@ -2802,7 +2806,6 @@
}
case undefined:
{
// Array of nodes, QueryResult objects
// if (Array.isArray(content)) {
if (typeof content.reduce === 'function') {
@ -2810,10 +2813,11 @@
return s + convertToString(node, type);
}, '');
}
}
break;
}
return;
return undefined;
}
case 'string':

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -37,6 +37,10 @@ function _iterableToArray(iter) {
}
function _iterableToArrayLimit(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = [];
var _n = true;
var _d = false;
@ -100,7 +104,6 @@ function convertToString(content, type) {
}
case undefined:
{
// Array of nodes, QueryResult objects
// if (Array.isArray(content)) {
if (typeof content.reduce === 'function') {
@ -108,10 +111,11 @@ function convertToString(content, type) {
return s + convertToString(node, type);
}, '');
}
}
break;
}
return;
return undefined;
}
case 'string':
@ -536,4 +540,4 @@ var manipulation = function manipulation($, jml) {
return $;
};
export { after, before, append, prepend, html, text, insertTo, clone, empty, remove, attr, removeAttr, addClass, removeClass, hasClass, toggleClass, manipulation };
export { addClass, after, append, attr, before, clone, empty, hasClass, html, insertTo, manipulation, prepend, remove, removeAttr, removeClass, text, toggleClass };

5643
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,18 +17,19 @@
"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",
"build-docs-remove": "rimraf docs/jsdoc/*",
"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",
"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'",
"copy": "cp node_modules/load-stylesheets/dist/index-es.js editor/external/load-stylesheets/index-es.js && cp node_modules/jamilih/dist/jml-es.js editor/external/jamilih/jml-es.js && cp node_modules/query-result/esm/index.js editor/external/query-result/esm/index.js && cp node_modules/qr-manipulation/dist/index-es.js editor/external/qr-manipulation/dist/index-es.js && cp node_modules/stackblur-canvas/dist/stackblur-es.js editor/external/stackblur-canvas/dist/stackblur-es.js && cp node_modules/regenerator-runtime/runtime.js editor/external/regenerator-runtime/runtime.js && cp node_modules/core-js-bundle/minified.js editor/external/core-js-bundle/minified.js && cp node_modules/core-js-bundle/minified.js.map editor/external/core-js-bundle/minified.js.map",
"compress-images": "imageoptim \"chrome-app/*.png\" && imageoptim \"editor/extensions/*.png\" && imageoptim \"editor/spinbtn/*.png\" && imageoptim \"editor/jgraduate/images/*.{png,gif}\" && imageoptim \"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 .",
"eslint": "eslint --ext js,md,html .",
"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-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:run": "cypress run && npm run coverage-badge",
@ -125,12 +126,12 @@
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"coffeescript": "^2.4.1",
"copyfiles": "^2.1.1",
"core-js-bundle": "^3.6.0",
"core-js-bundle": "^3.6.1",
"coveradge": "^0.1.0",
"cypress": "^3.8.0",
"cypress": "^3.8.1",
"cypress-axe": "^0.5.3",
"eslint": "^6.8.0",
"eslint-config-ash-nazg": "^15.0.0",
"eslint-config-ash-nazg": "^16.0.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-array-func": "^3.1.3",
"eslint-plugin-compat": "^3.3.0",
@ -142,7 +143,7 @@
"eslint-plugin-markdown": "^1.0.1",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint-plugin-no-use-extend-native": "^0.4.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "^4.0.1",
@ -169,6 +170,7 @@
"rollup-plugin-re": "^1.0.7",
"rollup-plugin-terser": "^5.1.3",
"stackblur-canvas": "^2.2.0",
"typescript": "^3.7.4"
"typescript": "^3.7.4",
"underscore": "^1.6.0"
}
}