Closed douglasdeodato closed 9 years ago
Can you paste your entire Gruntfile.js
and the command you are running?
hi, thanks for your answer, that is my full gruntfile.js
i am getting that error now: Fatal error: grunt.sprite requires a src, dest (img), and destCss property
https://gist.github.com/douglasdeodato/2137804a38ca1bc42f72
thank you.
You are writing in too many layers of nesting for your config. Instead of sprite.dist
, it should be sprite.all
(or only sprite.dist
):
var sprite;
config.sprite = sprite = {};
// Configure grunt
sprite.dist ={
src: 'public/images/*.png',
dest: 'public/images/sprite/spritesheet.png',
destCss: 'sass/sprites.css'
};
thanks a lot, solved.
I am trying to generate svg its throwing an error,any help?
sprite: { all: { src: 'assets/svg/*.svg', dest: 'assets/test.svg', destCss: 'assets/sprites.css' } }
Fatal error: Unsupported file type: image/svg+xml
@kalburgimanjunath That is an unrelated error message/issue. spritesmith
only supports bitmap images (e.g. png
, gif
, jpg
) -- you'll likely want an SVG sprite library. If you have further questions, please open another issue
after run : grunt sprite, i got this.
all folders and files exists and are there, any help?
my grunt:
/sprite min =============================== var spritesmith; config.spritesmith = spritesmith = {};