1.0.4 • Published 11 years ago

grunt-svg-compactor v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
11 years ago

grunt-svg-compactor

Turns a folder of SVG files into a single .css file using data-uri.

This npm package is originally based on SVG-Stacker https://github.com/preciousforever/SVG-Stacker. The whole difference is it not generate any stacked svg file, but only one .css file referencing svg paths directly in classes, so it's ready to use whithout the need of javascript. Also, it uses 'cheerio' instead of 'libxmljs' for DOM manipulations to work on windows platform.

The idea is largely inspired from the grunticon project, that you should use if you plan to deserve old browsers with png fallback. In fact, the main difference with grunticon, is that the generated css file includes default width/height for each asset.

usage :

grunt.loadNpmTasks('grunt-svg-compactor');

svgcompactor: {
  all: {
    source: '<%= dirs.svgsrc %>/min-assets',
    target: '<%= dirs.svgsrc %>',
    outputname: 'stack'
  }
}
1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago