sprity / sprity-cli

Command line interface for sprity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-s, --style option is ignored

jednano opened this issue · comments

commented

It seems that if I specify the -s or --style option that it completely ignores my path and writes the Sass file to the same location as the sprite images. I am using the following command:

$ sprity create ./dist/images/sprites "images/sprites/foo/*.png" --template sprity-scss.hbs
--style dist/styles/sprites.scss

This writes sprites.scss into my ./dist/images/sprites folder. Furthermore, if I use the --split option it doesn't write a Sass file at all! That's using the following command:

$ sprity create ./dist/images/sprites "images/sprites/**/*.png" --template sprity-scss.hbs
--style dist/styles/sprites.scss --split

How did you solve this? Got the same issue

commented

No idea. This was eons ago.

Solved it with the gulp-if => if images write to ./images/ and else write to ./css/ e.g.