svg-sprite

SVG sprites & stacks galore — A low-level Node.js module that takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of several types along with suitable stylesheet resources (e.g. CSS, Sass, LESS, Stylus, etc.)

MIT License

Downloads
563.2K
Stars
1.9K
Committers
54

Bot releases are visible (Hide)

svg-sprite - v2.0.4 Latest Release

Published by XhmikosR 7 months ago

  • Fixed _transformShape not calling all transformations 0302084 (backported from main)
  • Adding failing tests for issue #762 85d9a3a (backported from main)
svg-sprite - v3.0.0-rc2

Published by XhmikosR 7 months ago

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-rc1...v3.0.0-rc2

svg-sprite - v2.0.3

Published by XhmikosR 8 months ago

Hopefully this will be the last 2.x version and the next version will be v3.0.0. There might be regressions compared to 1.x in main (3.x), so if you have time please make a PR with an accompanied test case and CC me.

This is the only way to move forward given the limited resources we have.


What's Changed

New Contributors

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.2...v2.0.3

svg-sprite - v3.0.0-rc1

Published by XhmikosR 8 months ago

Hopefully this will be the last beta/rc version and no further breaking changes will happen. There might be regressions compared to 1.x or 2.x, so if you have time please make a PR with an accompanied test case and CC me.

This is the only way to move forward given the limited resources we have.


What's Changed

New Contributors

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-beta3...v3.0.0-rc1

svg-sprite - v3.0.0-beta3

Published by XhmikosR 11 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-beta2...v3.0.0-beta3

svg-sprite - v3.0.0-beta2

Published by XhmikosR over 1 year ago

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-beta1...v3.0.0-beta2?w=1

svg-sprite - v3.0.0-beta1

Published by XhmikosR over 1 year ago

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-alpha2...v3.0.0-beta1

svg-sprite - v3.0.0-alpha2

Published by XhmikosR over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v3.0.0-alpha1...v3.0.0-alpha2

svg-sprite - v3.0.0-alpha1

Published by XhmikosR almost 2 years ago

Breaking Changes

  • Require Node.js >= 14.18.0

What's Changed

New Contributors

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.2...v3.0.0-alpha1?w=1

svg-sprite - v2.0.2

Published by XhmikosR almost 2 years ago

svg-sprite - v2.0.1

Published by XhmikosR almost 2 years ago

svg-sprite -

Published by XhmikosR about 2 years ago

Breaking changes

  • Drop Node.js < 12 support
  • Update svgo to v2.x

Changes

  • Add namespaceIDPrefix option
  • Add rel="noopener noreferrer" to all links in generated HTML pages.
  • Add compileAsync method
  • Add support for disabling root viewBox attribute in stack mode
  • Add ID references substitution in href attributes (earlier worked with xlink:href only)
  • Drop Node.js < 12 support
  • Remove the deprecated config.transform option
  • Add milliseconds in logger's output
  • Change SVG dimensions calculation from PhantomJS to resvg-js, drop PhantomJ direct dependency (replaced with resvg-js)
  • Fix a rare issue with valid SVG files marked as invalid
  • Fix a rare bug with checking if passed config.log option is an instance of winston.Logger
  • Fix missing shape names when adding input files with a relative path
  • Replace cssmin with csso
  • Reduce lodash and other direct dependencies; switch to native JS alternatives

Dev updates

  • Update all devDepedencies
  • Switch to xo for linting
  • Replace mocha, should and c8 with jest
  • Replace PhantomJS and image-diff with playwright and pixelmatch for regression tests
  • A lot of docs tweaks
  • A lot of code refactoring
    • Switch to ES6+ syntax and methods
    • Switch to async methods whenever possible
    • Switch to ES6 classes whenever possible
    • Fix JSDoc documentation
  • Massively improve tests
    • Add regression tests for SVGs without dimensions
    • Add regression tests for all modes
    • Add tests and coverage reports to CI (Linux, Windows support)

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v1.5.4...v2.0.0?w=1

svg-sprite - v2.0.0-beta7

Published by XhmikosR over 2 years ago

svg-sprite - v2.0.0-beta6

Published by XhmikosR over 2 years ago

⚠⚠⚠DEPRECATED DUE TO #702⚠⚠⚠


Highlights

  • Substitute ID references in href attributes
  • Further reduced lodash usage and replaced lodash with its individual packages; any help is welcome to reduce our deps even more, see #598
  • This should hopefully be the last beta release before the stable release

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.0-beta5...v2.0.0-beta6

svg-sprite - v2.0.0-beta5

Published by XhmikosR over 2 years ago

Highlights

  • Add support for disabling root viewBox attribute in stack mode
  • Fixed modeless run check
  • Dropped the image-size dependency since @resvg/resvg-js v2.0.0 can now calculate image dimensions
  • Further reduced lodash usage
  • Further refactoring

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.0-beta4...v2.0.0-beta5?w=1

svg-sprite - v2.0.0-beta4

Published by XhmikosR over 2 years ago

What's Changed

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.0-beta3...v2.0.0-beta4

svg-sprite - v2.0.0-beta3

Published by XhmikosR over 2 years ago

Highlights

  • Fixed passing winston logger to config
  • Added SVGSpriter.compileAsync method
  • Cleaned up templates markup and dropped support for Internet Explorer (you can still use custom templates if you need to support IE)
  • Reduced lodash usage more
  • Increased coverage more
  • tests:
    • move from mocha to jest
    • move from puppeteer & looks-same to playwright & pixelmatch

What's Changed

Install with npm i svg-sprite@next

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v2.0.0-beta2...v2.0.0-beta3

svg-sprite - v2.0.0-beta2

Published by XhmikosR over 2 years ago

Highlights

This release reduces the number of total dependencies even further. We also made progress in removing/replacing lodash dependency.

Changes since v2.0.0-beta1

Install with npm i svg-sprite@next

Full diff: https://github.com/svg-sprite/svg-sprite/compare/v2.0.0-beta1...v2.0.0-beta2

svg-sprite -

Published by XhmikosR over 2 years ago

Highlights

  • Dropped support for Node.js < 12 and switched to more modern JavaScript syntax
  • Switched to @resvg/resvg-js + image-size instead of phantomjs
  • Replaced cssmin with csso (we need tests for this, PRs welcome!)
  • Updated all dependencies (including svgo to v2.x)
  • Reduced total dependencies (transitive dependencies) to half! (228 -> 114)
  • Reduced lodash usage (patches welcome to reduce its use further and/or other dependencies!)
  • Improved tests + coverage (patches welcome to improve this further!)

Install with npm i svg-sprite@next

Thanks to everyone who contributed, and @Kreeg who joined to help!

Full diff: https://github.com/svg-sprite/svg-sprite/compare/v1.5.4...v2.0.0-beta1

svg-sprite -

Published by XhmikosR over 2 years ago

  • Update patch dependencies
  • Fix doc badges

https://github.com/svg-sprite/svg-sprite/compare/v1.5.3...v1.5.4