Skip to content

Commit

Permalink
Add less linter via npx (go-gitea#6936)
Browse files Browse the repository at this point in the history
  • Loading branch information
xf- authored and lunny committed May 14, 2019
1 parent c0fc6cd commit 3957b40
Show file tree
Hide file tree
Showing 20 changed files with 2,155 additions and 427 deletions.
12 changes: 12 additions & 0 deletions .lesshintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"idSelector": false,
"importPath": false,
"importantRule": false,
"maxCharPerLine": false,
"propertyOrdering": false,
"qualifyingElement": false,
"spaceAroundComma": false,
"stringQuotes": "double",
"universalSelector": false,
"zeroUnit": "no_unit"
}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ generate-stylesheets:
exit 1; \
fi;
$(eval BROWSERS := "> 1%, last 2 firefox versions, last 2 safari versions, ie 11")
npx lesshint public/less/
npx lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css="--s0 -b" public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
$(foreach file, $(wildcard public/css/*),npx postcss --use autoprefixer --autoprefixer.browsers $(BROWSERS) -o $(file) $(file);)
Expand Down
Loading

0 comments on commit 3957b40

Please sign in to comment.