Closed Avcajaraville closed 9 years ago
Here's my Gulp task & setup
config = {
mode : {
view : {
sprite : '../svg/sprite.view.svg',
dest : '.',
bust : false,
example : true,
render : {
scss : {
dest : '../../src/scss/_svgsprite.scss'
}
}
}
}
};
gulp.task('svgsprite', function() {
gulp.src('**/*.svg', { cwd: './src/lib/svgsprite'})
.pipe(plumber(plumberErrorHandler))
.pipe(svgSprite(config))
.pipe(gulp.dest('./public/build'));
});
This takes svgs from src/lib/svgsprite
and puts the sprite into public/build/svg
and it places the Sass partial into src/scss
.
I wonder if your gulpSvgSpritesAdminSettings
is causing it problems. I'd probably have 2 separate configs.
Im actually have two different config files. The problem for me its which file route is relative to another, etc, etc... Its very confusing for me ...
@Avcajaraville Please refer to #12 — I explained it in detail over there.
Hi !
Im also struggeling with this issue. Im not able to archieve what I want. Sometimes, the files got generated properlly, and some other, they are not.
When seems that everything works nice. Im having problems with the url on the generated scss.
I want to generate svg sprites for two part of my app: public and admin. They have different structure.
So, lets have a look to my folder structure first.
This are my two tasks (on front-end/gulp/tasks/graphics/svg-sprites.svg );
And these my (wrong) config file:
I really have a problem trying to understand how the routes works and how to archieve what Im looking for.
Any help will be very appreciated.
Thanks a lot !