mirror of
https://github.com/go-gitea/gitea
synced 2025-08-10 11:38:20 +00:00
Use standard lessc and minify CSS using Node.js (#2337)
* Use standard lessc and minify CSS using Node.js This changes the previous nonstandard `lessc` to the official one and enables CSS minification via the clean-css module. To build CSS, Node.js is required along with a `npm install` to get the tools installed locally in node_modules so there is no dependency on binaries in PATH. Benefits include: - Allows one to have a standard lessc in PATH. - Can now use command line switches on lessc. - Minified CSS brings faster page load times and also has the benefit of discouraging contributors from editing CSS directly. To build CSS, Node.js is required along with a `npm install` to get the tools installed locally based on the information in `package.json`. The 'make stylesheet' task was modified to run without condition. This makes it easier to work on the make task itself without having to delete files. Also fixes: https://github.com/go-gitea/gitea/issues/2198 * install node, npm and modules on drone * .PHONY * use 'minify' to minify CSS
This commit is contained in:
@@ -16,6 +16,8 @@ pipeline:
|
||||
TAGS: bindata sqlite
|
||||
GOPATH: /srv/app
|
||||
commands:
|
||||
- apk -U add nodejs nodejs-npm
|
||||
- npm install
|
||||
- make clean
|
||||
- make generate
|
||||
- make vet
|
||||
|
Reference in New Issue
Block a user