svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
647 stars 43 forks source link

Remove 'mode' name from output directory #30

Closed brianO3world closed 9 years ago

brianO3world commented 9 years ago

Hey!

Trying to get set-up with this new package since 'gulp-svg-sprites' is no longer working. I have my SCSS and Sprite exporting but it's writing my directory structure inside of a 'view' folder on my site root. Is there a way to remove the 'mode' name folder and have the output SCSS and SVG files places in the directories I want?

For example:

What I am getting:

view > images > 'test.svg' view > styles > scss > _partial > '_sprite.scss'

What I want:

images > 'test.svg' styles > scss > _partial > '_sprite.scss'

I need these generated assets to go into the folders I have existing on my site otherwise I'm moving stuff around every time. How might I do this?

Thanks, Brian

jkphl commented 9 years ago

Hi @brianO3world,

it's most likely the mode.<mode>.dest property you will want to use, please see here:

var config = {
    mode : {
        view : {
            dest: '.'
        }
    }
}

There's also a special section about output destinations in the docs which might help you‽

Cheers, Joschi

brianO3world commented 9 years ago

I was able to finally test this and everything worked great! Along with a few other updates this is working as a nice replacement for gulp-svg-sprites. Thanks!

jkphl commented 9 years ago

You're welcome! :)