mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 14:43:52 +03:00
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)
|
$(CSS_DEST): node_modules $(CSS_SOURCES)
|
||||||
npx stylelint web_src/less
|
npx stylelint web_src/less
|
||||||
npx lessc --clean-css="--s0 -b" web_src/less/index.less public/css/index.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 --clean-css="--s0 -b" web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).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 --no-map --replace public/css/*
|
npx postcss --use autoprefixer --use cssnano --no-map --replace public/css/*
|
||||||
|
|
||||||
.PHONY: javascripts
|
.PHONY: javascripts
|
||||||
javascripts:
|
javascripts:
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
"babel-loader": "8.0.6",
|
"babel-loader": "8.0.6",
|
||||||
"core-js": "3.4.1",
|
"core-js": "3.4.1",
|
||||||
"css-loader": "3.2.0",
|
"css-loader": "3.2.0",
|
||||||
|
"cssnano": "4.1.10",
|
||||||
"eslint": "6.6.0",
|
"eslint": "6.6.0",
|
||||||
"eslint-config-airbnb-base": "14.0.0",
|
"eslint-config-airbnb-base": "14.0.0",
|
||||||
"eslint-plugin-import": "2.18.2",
|
"eslint-plugin-import": "2.18.2",
|
||||||
"less": "3.10.3",
|
"less": "3.10.3",
|
||||||
"less-plugin-clean-css": "1.5.1",
|
|
||||||
"postcss-cli": "6.1.3",
|
"postcss-cli": "6.1.3",
|
||||||
"style-loader": "1.0.0",
|
"style-loader": "1.0.0",
|
||||||
"stylelint": "11.1.1",
|
"stylelint": "11.1.1",
|
||||||
|
|
Loading…
Reference in a new issue