The plugin replaces 'svgmin' and 'svgstore' with an all-in-one and highly flexible solution for managing SVG assets.
Changes:
- Deleted 'assets/images/sprite/', SVG images can live anywhere within the source image directory;
- When compiled to 'www/assets/images/sprite.svg', the plugin generates an HTML file in 'assets/images/sprite.symbol.html' that serves as an index of the spritesheet's contents;
- A separator ("--") is used when traversing a directory structure for the symbol ID (e.g, 'sprite.svg#icons--social--twitter');
28 lines
549 B
JavaScript
28 lines
549 B
JavaScript
module.exports = {
|
|
options: {
|
|
spawn: false,
|
|
livereload: false
|
|
},
|
|
javascript_vendors: {
|
|
files: [ '<%= paths.js.src %>/vendors/**/*.js', '<%= paths.grunt %>/config/concat.js' ],
|
|
tasks: [ 'concat', 'notify:javascript' ]
|
|
},
|
|
sass: {
|
|
files: [ '<%= paths.css.src %>/**/*.scss' ],
|
|
tasks: [ 'sass', 'postcss', 'notify:sass' ]
|
|
},
|
|
svg: {
|
|
files: [ '<%= paths.img.src %>/**/*.svg' ],
|
|
tasks: [ 'svg_sprite', 'notify:svg' ]
|
|
},
|
|
tasks: {
|
|
options: {
|
|
reload: true
|
|
},
|
|
files: [
|
|
'Gruntfile.js',
|
|
'<%= paths.grunt %>/**/*'
|
|
]
|
|
}
|
|
};
|