diff options
author | silverwind <me@silverwind.io> | 2017-09-21 05:35:11 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-09-21 11:35:11 +0800 |
commit | 1fbfccb4fc9fc99405174b529206524179177474 (patch) | |
tree | 5b1ae8aec321c4911f1439e3a7a113d19f88e25b /CONTRIBUTING.md | |
parent | fa1cbc2896e6291f1bd4e4ec58bbfea1dfacaa39 (diff) | |
download | gitea-1fbfccb4fc9fc99405174b529206524179177474.tar.gz gitea-1fbfccb4fc9fc99405174b529206524179177474.zip |
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
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7422f43f1d..c9eb080baa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,6 +97,16 @@ and is synced regularily to Crowdin. Once a translation has reached A SATISFACTORY PERCENTAGE it will be synced back into this repo and included in the next released version. +## Building Gitea + +Generally, the go build tools are installed as-needed in the `Makefile`. +An exception are the tools to build the CSS and images. + +- To build CSS: Install [Node.js](https://nodejs.org/en/download/package-manager) + with `npm` and then run `npm install` and `make stylesheets`. +- To build Images: ImageMagick, inkscape and zopflipng binaries must be + available in your `PATH` to run `make generate-images`. + ## Code review Changes to Gitea must be reviewed before they are accepted, no matter who |