Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. 'use strict';
  2.  
  3. const
  4. gulp = require('gulp'),
  5. svgSymbols = require('gulp-svg-symbols'),
  6. svgo = require('gulp-svgo');
  7.  
  8. gulp.task('icons_symbols', function () {
  9. var stream = gulp.src(config.src + config.icons + '*.svg')
  10. .pipe(svgo({
  11. plugins: [
  12. {
  13. removeViewBox: false
  14. }
  15. ]
  16. }))
  17. .pipe(gulp.dest(config.tmpIcons))
  18. .pipe(svgSymbols({
  19. templates: [
  20. config.src + config.icons + 'templates/symbols.svg',
  21. config.src + config.icons + 'templates/icons.template.scss'
  22. ]
  23. }))
  24. .pipe(gulp.dest(config.src + config.icons + 'generated/'));
  25.  
  26. gulp.src(config.src + config.icons + 'generated/symbols.svg').pipe(gulp.dest(config.public + config.icons));
  27.  
  28. return stream;
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement