Skip to content

Commit

Permalink
Update SVG sprite generator
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptex committed Nov 7, 2022
1 parent de316b6 commit 61c286e
Show file tree
Hide file tree
Showing 3 changed files with 280 additions and 696 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-mpa",
"version": "3.11.0",
"version": "3.12.0",
"description": "Multi page app setup with webpack",
"keywords": [
"MPA",
Expand Down Expand Up @@ -73,13 +73,12 @@
"postcss-watch-folder": "2.0.0",
"sass": "1.56.0",
"sass-loader": "13.1.0",
"spritesh": "1.2.1",
"stylelint": "14.14.1",
"stylelint-config-recommended": "9.0.0",
"stylelint-config-standard-scss": "6.1.0",
"stylelint-no-unsupported-browser-features": "6.0.1",
"stylelint-scss": "4.3.0",
"svgo": "3.0.0",
"svg-symbol-sprite": "1.1.0",
"webpack": "5.74.0",
"webpack-cli": "4.10.0",
"webpack-shell-plugin-next": "2.3.1",
Expand Down
3 changes: 1 addition & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ const shellScripts = [];
const svgs = readdirSync('./assets/images/svg').filter(svg => svg[0] !== '.');

if (svgs.length) {
shellScripts.push('svgo -f assets/images/svg');
shellScripts.push('spritesh -q -i assets/images/svg -o ./assets/dist/sprite.svg -p svg-');
shellScripts.push('svg-symbol-sprite -i assets/images/svg -o assets/dist/sprite.svg -p svg-');
}

module.exports = (env, argv) => {
Expand Down
Loading

0 comments on commit 61c286e

Please sign in to comment.