v4.0.0
Full Changelog: v3.0.1...v4.0.0
Make sure to read the Configuration changes section below to make sure your configuration is up-to-date.
The optimize option, which included SVGO in this plugin, has been dropped in favor of the icon.transform function which can do any transformation (including optimizing!) on the raw icon. This also reduced the bundle size by ~60-75%! Yay! I also did a mini rewrite of the core plugin structure; errors messages are a little more detailed (and more colorful!), arbitrary requirements like forcing a .svg extension for the generateFile option have been removed, etc.
Configuration changes
New: 🟢
Changed: 🔶
Removed: 🟥
- 🔶
sources: is now an array of source objects, which has the added benefit of the ability to add additional options for each source down the road. Each source has two required properties,nameandpath, and an optionaldefaultproperty (maximum one source can be the default). - 🟥
default: removed in favor of the default property of a source insources(see ^^^) - 🟥
optimize: dropped in favor of theicon.transformfunction - 🟥
SVGO: no longer needed withoutoptimize - 🔶
sprites: renamed tosprite - 🔶
sprites.insertAttributes: renamed tosprite.attributes - 🟢
icon.transform: transform the raw content of each icon directly! - 🔶
icon.insertAttributes: renamed toicon.attributes - 🔶
icon.insertAttributesBySource: renamed toicon.attributesBySource - 🟢
icon.errorNotFound: throw an error when an icon is not found (default:true) - 🟥
icon.ignoreNotFound: dropped in favor oferrorNotFound(see ^^^) - 🔶
sprites.generateFile: renamed tosprite.writeFile, no longer acceptstrue(no default path). Set to a path string orfalse. - 🟢
sprite.extraIcons:{ all: false, sources: [], icons: [] }-alltakes the place ofsprites.insertAll,sourcesis a new array of source names to include all icons from,iconstakes an array of{ name: '', source: '' }icon objects to include. - 🟥
sprites.insertAll: dropped in favor ofsprite.extraIcons(see ^^^)