v2.2.0
- .js and .coffee mapping files are now loaded as NodeJS modules. (Previously, they were run as special functions.)
- Makes these files more interoperable when using them as mappings vs. via
require
orimport
. - Reveals additional Node features (e.g.
module
global) - Enables a lot of other exciting features:
- Makes these files more interoperable when using them as mappings vs. via
- New support for
import
syntax as an alternative torequire
. - New ways to specify the mapping from a mapping file:
export default mapping
orexports.default = mapping
. You can still just write themapping
at the end of the file. require
d andimport
ed modules can use JSX syntax, so you can share JSX code between mapping files. (#65)- Source maps are now fully supported, which means errors from your CoffeeScript mapping files will now have correct line numbers. (#56)
- Command-line interface has new options for setting the output directory, helping you keep organized. (#58)
-o
/--output
sets an overall default output directory-os
/--output-svg
,-op
/--output-pdf
,-oP
/--output-png
,-ot
/--output-tex
control output directory by file type
- API changes to support a settings object instead of overriding class static attributes. (#47)
- All settings can now be overridden in
renderDOM
viadata-*
attributes. - New
defaultSettings
exported object to modify defaults. - Replaces old undocumented
renderDOMDefaults
object. - Replaces old undocumented overrides:
Drawing.inlineImages
,Drawing.keepMargins
,Drawing.useHref
,Drawings.keepHidden
,Symbol.svgEncoding
,Symbol.forceWidth
,Symbol.forceHeight
,Symbol.texText
,Symbol.overflowDefault
- All settings can now be overridden in
xmldom
upgrade means that>
is now escaped as>
. This can affect CSS output, but should make the resulting SVG easier to parse.
Full Changelog: v2.1.1...v2.2.0