Last active
January 25, 2023 13:52
-
-
Save alexantr/3d2247ff8dc5a7b9c1af38af9e2312f8 to your computer and use it in GitHub Desktop.
Revisions
-
alexantr revised this gist
Jan 25, 2023 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ module.exports = { multipass: true, plugins: [ { name: 'preset-default', params: { overrides: { removeViewBox: false, }, }, }, 'convertStyleToAttrs', 'sortAttrs', ], }; -
alexantr revised this gist
Jan 25, 2023 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ REM Minify JS CSS SVG REM npm install uglify-js -g REM or REM npm install terser -g REM npm install clean-css-cli -g REM npm install svgo -g @@ -15,15 +17,16 @@ set script_path=%~dp0 if /I %ext%==.js ( echo File is JS call uglifyjs %in_path% -c -m -o %out_path% ) if /I %ext%==.css ( echo File is CSS call cleancss -o %out_path% %in_path% ) if /I %ext%==.svg ( echo File is SVG rem call svgo --enable=convertStyleToAttrs --disable=removeViewBox --multipass %in_path% call svgo --config="%~dp0svgo.config.js" %in_path% ) timeout 2 > NUL -
alexantr revised this gist
Nov 8, 2021 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,15 +14,15 @@ set ext=%~x1 set script_path=%~dp0 if /I %ext%==.js ( echo File is JS call terser %in_path% -c -m -o %out_path% ) if /I %ext%==.css ( echo File is CSS call cleancss -o %out_path% %in_path% ) if /I %ext%==.svg ( echo File is SVG call svgo --enable=convertStyleToAttrs --disable=removeViewBox --multipass %in_path% ) -
alexantr created this gist
Nov 8, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ @echo off REM Minify JS CSS SVG REM npm install terser -g REM npm install clean-css-cli -g REM npm install svgo -g setlocal enabledelayedexpansion set in_path="%~dpnx1" set out_path="%~dpn1.min%~x1" set ext=%~x1 set script_path=%~dp0 if /I %ext%==.js ( echo File is JS (using terser) call terser %in_path% -c -m -o %out_path% ) if /I %ext%==.css ( echo File is CSS (using cleancss) call cleancss -o %out_path% %in_path% ) if /I %ext%==.svg ( echo File is SVG (using svgo) call svgo --enable=convertStyleToAttrs --disable=removeViewBox --multipass %in_path% ) timeout 2 > NUL