Skip to content

Commit

Permalink
feat: optimize SVGs during build
Browse files Browse the repository at this point in the history
  • Loading branch information
mojoaxel committed Nov 19, 2023
1 parent fa65ff6 commit 3acaeed
Show file tree
Hide file tree
Showing 3 changed files with 790 additions and 30 deletions.
8 changes: 7 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
*/

const gulp = require('gulp');
const svgo = require('gulp-svgo');

gulp.task(
'symbols',
gulp.series(() => gulp.src('./svg/*.svg').pipe(gulp.dest('dist-css/svg'))),
gulp.series(() =>
gulp
.src('./svg/*.svg')
.pipe(svgo())
.pipe(gulp.dest('dist-css/svg'))
)
);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@types/rimraf": "^4.0.5",
"fs-extra": "^11.1.0",
"gulp": "^4.0.2",
"gulp-svgo": "^2.2.1",
"http-server": "^14.1.1",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
Expand Down
Loading

0 comments on commit 3acaeed

Please sign in to comment.