svgo-viewbox

Add viewBox attribute to your SVGs and then optimize them with SVGO

MIT License

Downloads
1.5K
Stars
6
Committers
4
svgo-viewbox - Type: Module Latest Release

Published by scriptex about 1 year ago

This release:

  • makes the package pure ES module (BREAKING change)
  • makes sure that the addViewBox plugin is always present regardless of the supplied SVGO config (BREAKING change)
svgo-viewbox - Correctly load custom SVGO config

Published by scriptex about 1 year ago

This release takes care of incorrectly loaded custom SVGO configuration file.

svgo-viewbox - Add support for optional and variadic arguments

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.

svgo-viewbox - Downgrade `meow`

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.

svgo-viewbox - Handle single files as well

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
svgo-viewbox - Updated metadata

Published by scriptex about 2 years ago

This release does not introduce any code changes.
This release updates the repository and package metadata.

svgo-viewbox - Downgrade Meow

Published by scriptex over 3 years ago

svgo-viewbox - Fix SVGO CleanupIDs plugin's unique ID ability

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.

svgo-viewbox - Fix CLI flags

Published by scriptex over 3 years ago

This release fixes an issue with kebab-cased CLI flag

svgo-viewbox - Updated README

Published by scriptex over 3 years ago

This release updates the README file for the v2 release

svgo-viewbox - Switch to SVGO v2

Published by scriptex over 3 years ago

This release uses SVGO v2 which uses a .js file as a config file by default.

svgo-viewbox - Initial release

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

Package Rankings
Top 10.18% on Npmjs.org
Badges
Extracted from project README
GitHub release GitHub issues GitHub last commit Build Status npm npm Analytics