Closed prteshJ closed 6 years ago
All svg files should be compressed and resized.
Grunt fails with >> Unable to compile; no valid source files were found.
Modify example to include svg instead of jpg,png or gif image formats. Run grunt.
Mac. ImageMagick.
module.exports = function(grunt) {
grunt.initConfig({ responsive_images: { dev: { options: { engine: 'im', sizes: [{ width: 800, suffix: '_large_1x', quality: 50 }] }, files: [{ expand: true, src: ['*.{svg}'], cwd: 'images_src/', dest: 'images/' }] } }, }); grunt.loadNpmTasks('grunt-responsive-images'); grunt.registerTask('default', ['responsive_images']);
};
package.json { "name": "responsive-svg", "version": "0.1.0", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-uglify": "~0.5.0", "grunt-responsive-images": "^0.1.4" }, "dependencies": { "grunt-responsive-images": "^0.1.6" } }
Please use a tool such as https://github.com/sindresorhus/grunt-svgmin for SVG minification
Thank you. :)
Expected Behaviour
All svg files should be compressed and resized.
Actual Behaviour
Grunt fails with >> Unable to compile; no valid source files were found.
Steps to Reproduce
Modify example to include svg instead of jpg,png or gif image formats. Run grunt.
PC/Mac and Graphics Engine used
Mac. ImageMagick.
Grunt Configuration
module.exports = function(grunt) {
};
package.json { "name": "responsive-svg", "version": "0.1.0", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-uglify": "~0.5.0", "grunt-responsive-images": "^0.1.4" }, "dependencies": { "grunt-responsive-images": "^0.1.6" } }