Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // $ comes from using gulp-load-plugins.
- gulp.task('assets:sprites', function () {
- return gulp.src(`${paths.source.images}/icon/**/*.svg`)
- .pipe($.changed('./'))
- .pipe($.svgSprite({
- shape: {
- spacing: {
- padding: 2
- }
- },
- svg: {
- precision: 1
- },
- mode: {
- css: {
- example: true,
- prefix: ".icon__%s",
- dimensions: true,
- render: {
- scss: true
- },
- sprite: `./../../img/icons`
- }
- }
- }))
- .pipe($.imagemin())
- .pipe(gulp.dest(`${paths.public.sprites}`));
- });
Add Comment
Please, Sign In to add comment