Add viewBox attribute to your SVGs and then optimize them with SVGO
MIT License
This release:
addViewBox
plugin is always present regardless of the supplied SVGO config (BREAKING change)Published by scriptex about 1 year ago
This release takes care of incorrectly loaded custom SVGO configuration file.
Published by scriptex over 1 year ago
This release adds support for optional and variadic arguments.
This new feature makes it possible to integrate svgo-viewbox
with code quality tools such as lint-staged
.
It is now possible to provide flexible command arguments and receive the expected results.
For example:
svgo-viewbox ./assets/logo.svg ./assets2
will add the viewBox
attribute to the logo.svg
file in ./assets
folder as well as all SVG files inside the ./assets2
folder.
The command can also be mixed with the already supported arguments.
For example:
svgo-viewbox -i ./assets/ -f ./svgo-config.js ./assets2/logo.svg
will add the viewBox
attribute to the logo.svg
file in ./assets2
folder as well as all svg files inside the ./assets
folder and will use the ./svgo-config.js
file when optimizing the SVG files with SVGO.
Published by scriptex over 1 year ago
This release downgrades the meow
package as it's newer versions are pure ESM and is incompatible with the current implementation of the svgo-viewbox
module.
Published by scriptex over 1 year ago
Up until today only SVG files located in a folder could have their viewBox
attribute added via svgo-viewbox
.
This release makes it possible to add the viewBox
attribute to a single SVG file as well.
Just use the module as before and specify the path to the SVG file in the --input
(or --i
) flag.
svgo-viewbox --i ./assets/images/svg/file.svg
Published by scriptex about 2 years ago
This release does not introduce any code changes.
This release updates the repository and package metadata.
Published by scriptex over 3 years ago
Published by scriptex over 3 years ago
This release fixes the (previously broken) ability of SVGO's CleanupIDs plugin to generate unique IDs for SVG elements.
Published by scriptex over 3 years ago
This release fixes an issue with kebab-cased CLI flag
Published by scriptex over 3 years ago
This release updates the README file for the v2 release
Published by scriptex over 3 years ago
This release uses SVGO v2 which uses a .js
file as a config file by default.
Published by scriptex almost 4 years ago
This is the initial release.
For usage, how-to and other useful information, please refer to the README