2009-09-05 16:46:41 +00:00
|
|
|
NAME=svg-edit
|
2015-12-03 04:25:46 +00:00
|
|
|
VERSION=2.8.1
|
2009-09-05 16:46:41 +00:00
|
|
|
PACKAGE=$(NAME)-$(VERSION)
|
2010-03-28 13:59:52 +00:00
|
|
|
MAKEDOCS=naturaldocs/NaturalDocs
|
|
|
|
CLOSURE=build/tools/closure-compiler.jar
|
2009-09-05 16:46:41 +00:00
|
|
|
ZIP=zip
|
|
|
|
|
2011-01-17 22:11:35 +00:00
|
|
|
# All files that will be compiled by the Closure compiler.
|
2012-03-17 17:45:28 +00:00
|
|
|
|
2011-01-17 22:11:35 +00:00
|
|
|
JS_FILES=\
|
- Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention)
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor)
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name)
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg)
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency
- Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary)
- Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js`
- Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential)
- Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n
- Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways).
- Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name
- Breaking change: Have `readLang` return lang and data but do not call `setLang`
- Fix: Have general locales load first so extensions may use
- Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG
- Fix: Wrong name for moinsave
- Update: Update WebAppFind per new API changes
- Enhancement: Make `setStrings` public on editor for late setting (used
by `ext-shapes.js`)
- Enhancement: Add `extensions_added` event
- Enhancement: Add `message` event (Relay messages including those which
have been been received prior to extension load)
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers
- Enhancement: Allow avoiding "name" in extension export (just extract out of file name)
- Enhancement: Add stack blur to canvg by default (and refactoring it)
- Enhancement: Return `Promise` for `embedImage` (as with some other loading methods)
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading
- Enhancement: Recover if an extension fails to load (just log and otherwise ignore)
- Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too
- Enhancement: Allowing importing of locales within `addLangData`
- npm: Update devDeps
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
- Docs: Add Edtior doc file for help to general users
- Docs: Clarify/simplify install instructions
- npm/Docs (JSDoc): Add script to check for overly generic types
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc)
- Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names)
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns`
- Docs (JSDoc): Add our own layout template to support overflow
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
- Docs: Generally update/improve docs (fixes #92)
- Docs: Update links to `latest` path (Avoid needing to update such references upon each release)
- Docs: 80 chars max
- Refactoring: Drop code for extension as function (already requiring export to be an object)
- Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names
- Refactoring: Add a `Command` base class
- Refactoring: Simplify svgicons `callback` ready detection
- Refactoring: Put `let` or `const` closer to scope
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
- Refactoring: Clearer variable names
- Refactoring: Use (non-deprecated) Event constructors
- Testing: Use new Sinon
2018-06-06 07:26:20 +00:00
|
|
|
namespaces.js \
|
|
|
|
jQuery.attr.js \
|
|
|
|
contextmenu/jQuery.contextMenu.js \
|
|
|
|
svgpathseg.js \
|
2011-01-17 22:11:35 +00:00
|
|
|
browser.js \
|
|
|
|
svgtransformlist.js \
|
|
|
|
math.js \
|
|
|
|
units.js \
|
- Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention)
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor)
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name)
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg)
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency
- Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary)
- Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js`
- Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential)
- Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n
- Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways).
- Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name
- Breaking change: Have `readLang` return lang and data but do not call `setLang`
- Fix: Have general locales load first so extensions may use
- Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG
- Fix: Wrong name for moinsave
- Update: Update WebAppFind per new API changes
- Enhancement: Make `setStrings` public on editor for late setting (used
by `ext-shapes.js`)
- Enhancement: Add `extensions_added` event
- Enhancement: Add `message` event (Relay messages including those which
have been been received prior to extension load)
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers
- Enhancement: Allow avoiding "name" in extension export (just extract out of file name)
- Enhancement: Add stack blur to canvg by default (and refactoring it)
- Enhancement: Return `Promise` for `embedImage` (as with some other loading methods)
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading
- Enhancement: Recover if an extension fails to load (just log and otherwise ignore)
- Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too
- Enhancement: Allowing importing of locales within `addLangData`
- npm: Update devDeps
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
- Docs: Add Edtior doc file for help to general users
- Docs: Clarify/simplify install instructions
- npm/Docs (JSDoc): Add script to check for overly generic types
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc)
- Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names)
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns`
- Docs (JSDoc): Add our own layout template to support overflow
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
- Docs: Generally update/improve docs (fixes #92)
- Docs: Update links to `latest` path (Avoid needing to update such references upon each release)
- Docs: 80 chars max
- Refactoring: Drop code for extension as function (already requiring export to be an object)
- Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names
- Refactoring: Add a `Command` base class
- Refactoring: Simplify svgicons `callback` ready detection
- Refactoring: Put `let` or `const` closer to scope
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
- Refactoring: Clearer variable names
- Refactoring: Use (non-deprecated) Event constructors
- Testing: Use new Sinon
2018-06-06 07:26:20 +00:00
|
|
|
utilities.js \
|
2011-01-17 22:11:35 +00:00
|
|
|
sanitize.js \
|
|
|
|
history.js \
|
2016-05-02 16:27:53 +00:00
|
|
|
historyrecording.js \
|
2013-02-14 15:19:46 +00:00
|
|
|
coords.js \
|
2013-02-20 06:42:00 +00:00
|
|
|
recalculate.js \
|
2011-01-17 22:11:35 +00:00
|
|
|
select.js \
|
|
|
|
draw.js \
|
2016-05-02 16:27:53 +00:00
|
|
|
layer.js \
|
2011-02-04 16:06:25 +00:00
|
|
|
path.js \
|
2011-01-17 22:11:35 +00:00
|
|
|
svgcanvas.js \
|
|
|
|
svg-editor.js \
|
2014-04-07 04:08:52 +00:00
|
|
|
locale/locale.js \
|
|
|
|
contextmenu.js
|
2011-01-17 22:11:35 +00:00
|
|
|
|
|
|
|
JS_INPUT_FILES=$(addprefix editor/, $(JS_FILES))
|
|
|
|
JS_BUILD_FILES=$(addprefix build/$(PACKAGE)/, $(JS_FILES))
|
|
|
|
CLOSURE_JS_ARGS=$(addprefix --js , $(JS_INPUT_FILES))
|
|
|
|
COMPILED_JS=editor/svgedit.compiled.js
|
|
|
|
|
2009-09-05 16:46:41 +00:00
|
|
|
all: release firefox opera
|
|
|
|
|
2011-01-17 22:11:35 +00:00
|
|
|
# The build directory relies on the JS being compiled.
|
|
|
|
build/$(PACKAGE): $(COMPILED_JS)
|
2009-10-09 19:15:18 +00:00
|
|
|
rm -rf config
|
|
|
|
mkdir config
|
2010-03-28 13:59:52 +00:00
|
|
|
if [ -x $(MAKEDOCS) ] ; then $(MAKEDOCS) -i editor/ -o html docs/ -p config/ -oft -r ; fi
|
2011-01-17 22:11:35 +00:00
|
|
|
|
|
|
|
# Make build directory and copy all editor contents into it
|
2009-09-05 16:46:41 +00:00
|
|
|
mkdir -p build/$(PACKAGE)
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r editor/* build/$(PACKAGE)
|
2011-01-17 22:11:35 +00:00
|
|
|
|
|
|
|
# Remove all hidden .svn directories
|
|
|
|
-find build/$(PACKAGE) -name .svn -type d | xargs rm -rf {} \;
|
|
|
|
|
2011-01-18 06:13:40 +00:00
|
|
|
# Create the release version of the main HTML file.
|
|
|
|
build/tools/ship.py --i=editor/svg-editor.html --on=svg_edit_release > build/$(PACKAGE)/svg-editor.html
|
2010-10-28 16:47:39 +00:00
|
|
|
|
2011-01-18 06:46:45 +00:00
|
|
|
# NOTE: Some files are not ready for the Closure compiler: (jquery)
|
2011-02-09 06:14:47 +00:00
|
|
|
# NOTE: Our code safely compiles under SIMPLE_OPTIMIZATIONS
|
2011-01-18 06:46:45 +00:00
|
|
|
# NOTE: Our code is *not* ready for ADVANCED_OPTIMIZATIONS
|
2011-02-09 06:14:47 +00:00
|
|
|
# NOTE: WHITESPACE_ONLY and --formatting PRETTY_PRINT is helpful for debugging.
|
2011-01-17 22:11:35 +00:00
|
|
|
$(COMPILED_JS):
|
2010-10-29 05:23:25 +00:00
|
|
|
java -jar $(CLOSURE) \
|
2011-01-18 06:46:45 +00:00
|
|
|
--compilation_level SIMPLE_OPTIMIZATIONS \
|
2011-01-17 22:11:35 +00:00
|
|
|
$(CLOSURE_JS_ARGS) \
|
|
|
|
--js_output_file $(COMPILED_JS)
|
2009-09-05 16:46:41 +00:00
|
|
|
|
2012-03-17 17:45:28 +00:00
|
|
|
compile: $(COMPILED_JS)
|
|
|
|
|
2009-09-05 16:46:41 +00:00
|
|
|
release: build/$(PACKAGE)
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build ; $(ZIP) $(PACKAGE).zip -r $(PACKAGE) ; cd ..
|
2010-09-09 16:36:17 +00:00
|
|
|
tar -z -c -f build/$(PACKAGE)-src.tar.gz \
|
2011-01-17 22:11:35 +00:00
|
|
|
--exclude='\.svn' \
|
2010-09-09 16:36:17 +00:00
|
|
|
--exclude='build/*' \
|
|
|
|
.
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
firefox: build/$(PACKAGE)
|
2009-09-05 18:46:53 +00:00
|
|
|
mkdir -p build/firefox/content/editor
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r firefox-extension/* build/firefox
|
2009-09-05 18:46:53 +00:00
|
|
|
rm -rf build/firefox/content/.svn
|
2009-09-05 18:52:39 +00:00
|
|
|
cp -r build/$(PACKAGE)/* build/firefox/content/editor
|
2011-02-11 16:25:04 +00:00
|
|
|
rm -f build/firefox/content/editor/embedapi.js
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build/firefox ; $(ZIP) ../$(PACKAGE).xpi -r * ; cd ../..
|
2009-09-05 16:46:41 +00:00
|
|
|
|
|
|
|
opera: build/$(PACKAGE)
|
|
|
|
mkdir -p build/opera/editor
|
2009-09-05 18:52:39 +00:00
|
|
|
cp opera-widget/* build/opera
|
|
|
|
cp -r build/$(PACKAGE)/* build/opera/editor
|
2009-09-05 18:36:44 +00:00
|
|
|
cd build/opera ; $(ZIP) ../$(PACKAGE).wgt -r * ; cd ../..
|
2009-09-05 16:46:41 +00:00
|
|
|
|
2011-06-01 12:53:49 +00:00
|
|
|
chrome:
|
|
|
|
mkdir -p build/svgedit_app
|
|
|
|
cp -a chrome-app/* build/svgedit_app
|
|
|
|
cd build ; $(ZIP) -r $(PACKAGE)-crx.zip svgedit_app ; rm -rf svgedit_app; cd ..
|
|
|
|
|
2013-02-23 21:32:09 +00:00
|
|
|
jgraduate:
|
- Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention)
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor)
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name)
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg)
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency
- Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary)
- Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js`
- Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential)
- Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n
- Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways).
- Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name
- Breaking change: Have `readLang` return lang and data but do not call `setLang`
- Fix: Have general locales load first so extensions may use
- Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG
- Fix: Wrong name for moinsave
- Update: Update WebAppFind per new API changes
- Enhancement: Make `setStrings` public on editor for late setting (used
by `ext-shapes.js`)
- Enhancement: Add `extensions_added` event
- Enhancement: Add `message` event (Relay messages including those which
have been been received prior to extension load)
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers
- Enhancement: Allow avoiding "name" in extension export (just extract out of file name)
- Enhancement: Add stack blur to canvg by default (and refactoring it)
- Enhancement: Return `Promise` for `embedImage` (as with some other loading methods)
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading
- Enhancement: Recover if an extension fails to load (just log and otherwise ignore)
- Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too
- Enhancement: Allowing importing of locales within `addLangData`
- npm: Update devDeps
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
- Docs: Add Edtior doc file for help to general users
- Docs: Clarify/simplify install instructions
- npm/Docs (JSDoc): Add script to check for overly generic types
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc)
- Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names)
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns`
- Docs (JSDoc): Add our own layout template to support overflow
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
- Docs: Generally update/improve docs (fixes #92)
- Docs: Update links to `latest` path (Avoid needing to update such references upon each release)
- Docs: 80 chars max
- Refactoring: Drop code for extension as function (already requiring export to be an object)
- Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names
- Refactoring: Add a `Command` base class
- Refactoring: Simplify svgicons `callback` ready detection
- Refactoring: Put `let` or `const` closer to scope
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
- Refactoring: Clearer variable names
- Refactoring: Use (non-deprecated) Event constructors
- Testing: Use new Sinon
2018-06-06 07:26:20 +00:00
|
|
|
java -jar $(CLOSURE) --js editor/jgraduate/jquery.jGraduate.js --js_output_file editor/jgraduate/jquery.jgraduate.min.js
|
2009-09-05 16:46:41 +00:00
|
|
|
clean:
|
2009-10-09 19:15:18 +00:00
|
|
|
rm -rf config
|
2009-09-05 16:46:41 +00:00
|
|
|
rm -rf build/$(PACKAGE)
|
|
|
|
rm -rf build/firefox
|
|
|
|
rm -rf build/opera
|
2011-01-18 06:13:40 +00:00
|
|
|
rm -rf build/$(PACKAGE).zip
|
|
|
|
rm -rf build/$(PACKAGE)-src.tar.gz
|
|
|
|
rm -rf build/$(PACKAGE).xpi
|
|
|
|
rm -rf build/$(PACKAGE).wgt
|
2011-01-17 22:11:35 +00:00
|
|
|
rm -rf $(COMPILED_JS)
|