diff --git a/CHANGES.md b/CHANGES.md index 9460e530..71d67bcb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,8 @@ global available to use (e.g., if using the modular editor) - Fix (Embedded editor): Add events only after load is complete and svgCanvas is available; also log blocked error objects +- Enhancement: For anyone visiting the ES6 modules entrance file without ESM + support, redirect to non-modular vesion - Enhancement: For PDF export, switch Chrome by default to "save" `outputType` - Refactoring (canvg): Better type-checking on `canvasRGBA_` (but set correctly by default anyways) @@ -19,6 +21,7 @@ - Docs: CHANGES clarifications - Docs (JSdoc): Denote optional arguments - Docs: More info on `importLocale` for extensions +- Build: Add comment not to edit xdomain editor directly - Build: Remove unused `Makefile` # 3.0.1 diff --git a/build-html.js b/build-html.js index 15709b35..0e9b5445 100644 --- a/build-html.js +++ b/build-html.js @@ -32,6 +32,22 @@ const filesAndReplacements = [ [ '', '' + ], + [ + '', + '' + ] + ] + }, + // Now that file has copied, we can replace the DOCTYPE in xdomain + { + input: 'editor/xdomain-svg-editor-es.html', + output: 'editor/xdomain-svg-editor-es.html', + replacements: [ + [ + '', + ` +` ] ] }, @@ -55,6 +71,10 @@ const filesAndReplacements = [ [ '', '' + ], + [ + '', + '' ] ] }, @@ -74,6 +94,10 @@ const filesAndReplacements = [ [ '', '' + ], + [ + '', + '' ] ] }, @@ -89,32 +113,35 @@ const filesAndReplacements = [ [ '', '' + ], + [ + '', + '' ] ] } ]; -filesAndReplacements.reduce((p, {input, output, replacements}) => { - return p.then(async () => { - let data; - try { - data = await fs.readFile(input, 'utf8'); - } catch (err) { - console.log(`Error reading ${input} file`, err); - } +filesAndReplacements.reduce(async (p, {input, output, replacements}) => { + await p; + let data; + try { + data = await fs.readFile(input, 'utf8'); + } catch (err) { + console.log(`Error reading ${input} file`, err); + } - data = replacements.reduce((s, [find, replacement]) => { - return s.replace(find, replacement); - }, data); + data = replacements.reduce((s, [find, replacement]) => { + return s.replace(find, replacement); + }, data); - try { - await fs.writeFile(output, data); - } catch (err) { - console.log(`Error writing file: ${err}`, err); - return; - } - console.log(`Completed file ${input} rewriting!`); - }); + try { + await fs.writeFile(output, data); + } catch (err) { + console.log(`Error writing file: ${err}`, err); + return; + } + console.log(`Completed file ${input} rewriting!`); }, Promise.resolve()).then(() => { console.log('Finished!'); }); diff --git a/editor/extensions/imagelib/index-es.html b/editor/extensions/imagelib/index-es.html index f70eca62..2cba3f4f 100644 --- a/editor/extensions/imagelib/index-es.html +++ b/editor/extensions/imagelib/index-es.html @@ -4,6 +4,7 @@