grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-svgstore');
grunt.initConfig({
}
},
+ svgstore: {
+ options: {
+ cleanup: true
+ },
+ sprite: {
+ files: {
+ 'dist/img/sprite.svg': [
+ 'img/mo.svg'
+ ]
+ }
+ }
+ },
+
watch: {
copy: {
files: [ 'html/**/*.html' ],
less: {
files: [ 'less/**/*.less' ],
tasks: [ 'less' ]
+ },
+ svgstore: {
+ files: [ 'img/**/*.svg' ],
+ tasks: [ 'svgstore' ]
}
}
});
- grunt.registerTask('default', [ 'copy', 'less' ]);
+ grunt.registerTask('default', [ 'copy', 'less', 'svgstore' ]);
};