forked from forgejo/forgejo
Switch CSS minifier to cssnano (#9260)
This results in around 4kB saving in CSS size and also resolves with a particular issue on git bash which had issues with the format of the lessc arguments.
This commit is contained in:
parent
d7c52b8dce
commit
9ff5b75559
2 changed files with 4 additions and 4 deletions
6
Makefile
6
Makefile
|
@ -469,9 +469,9 @@ css: node-check $(CSS_DEST)
|
|||
|
||||
$(CSS_DEST): node_modules $(CSS_SOURCES)
|
||||
npx stylelint web_src/less
|
||||
npx lessc --clean-css="--s0 -b" web_src/less/index.less public/css/index.css
|
||||
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc --clean-css="--s0 -b" web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
|
||||
npx postcss --use autoprefixer --no-map --replace public/css/*
|
||||
npx lessc web_src/less/index.less public/css/index.css
|
||||
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
|
||||
npx postcss --use autoprefixer --use cssnano --no-map --replace public/css/*
|
||||
|
||||
.PHONY: javascripts
|
||||
javascripts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue