aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/doc/advanced
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2019-12-05 04:41:38 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2019-12-05 11:41:38 +0800
commitd9c67a8c903fa9927bad28f5fcb816f89f8200eb (patch)
treeb652427ec0da37baf13ea27fd5e0a99ed5c656ec /docs/content/doc/advanced
parente80fe201c0e7b1f7a73aa932d4a02068e044f0ce (diff)
downloadgitea-d9c67a8c903fa9927bad28f5fcb816f89f8200eb.tar.gz
gitea-d9c67a8c903fa9927bad28f5fcb816f89f8200eb.zip
Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git. - Added version checks for both Go and Node.js. - Overhauled the js/css make target to only run when needed. - Merged the `generate` make target into `build` as per suggestion. Fixes: https://github.com/go-gitea/gitea/issues/6782 Fixes: https://github.com/go-gitea/gitea/issues/9216
Diffstat (limited to 'docs/content/doc/advanced')
-rw-r--r--docs/content/doc/advanced/hacking-on-gitea.en-us.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/content/doc/advanced/hacking-on-gitea.en-us.md b/docs/content/doc/advanced/hacking-on-gitea.en-us.md
index 01e2474651..fd7e962687 100644
--- a/docs/content/doc/advanced/hacking-on-gitea.en-us.md
+++ b/docs/content/doc/advanced/hacking-on-gitea.en-us.md
@@ -23,6 +23,10 @@ environment variable and to add the go bin directory or directories
`${GOPATH//://bin:}/bin` to the `$PATH`. See the Go wiki entry for
[GOPATH](https://github.com/golang/go/wiki/GOPATH).
+Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
+required to build the JavaScript and CSS files. The minimum supported Node.js
+version is 10 and the latest LTS version is recommended.
+
You will also need make.
<a href='{{< relref "doc/advanced/make.en-us.md" >}}'>(See here how to get Make)</a>
@@ -98,7 +102,7 @@ from source</a>.
The simplest recommended way to build from source is:
```bash
-TAGS="bindata sqlite sqlite_unlock_notify" make generate build
+TAGS="bindata sqlite sqlite_unlock_notify" make build
```
However, there are a number of additional make tasks you should be aware of.
@@ -136,19 +140,17 @@ You should run revive, vet and spell-check on the code with:
make revive vet misspell-check
```
-### Updating CSS
-
-To generate the CSS, you need [Node.js](https://nodejs.org/) 8.0 or greater with npm. We use [less](http://lesscss.org/) and [postcss](https://postcss.org) to generate our CSS. Do **not** edit the files in `public/css` directly, as they are generated from `lessc` from the files in `public/less`.
+### Working on CSS
-Edit files in `public/less`, and then run the linter and build the CSS files via:
+Edit files in `web_src/less` and run the linter and build the CSS files via:
```bash
make css
```
-### Updating JS
+### Working on JS
-To generate the JS files, you need [Node.js](https://nodejs.org/) 8.0 or greater with npm. Edit files in `public/js`, run the linter and build the JS files via:
+Edit files in `web_src/js`, run the linter and build the JS files via:
```bash
make js
@@ -235,7 +237,7 @@ Unit tests will not and cannot completely test Gitea alone. Therefore, we
have written integration tests; however, these are database dependent.
```bash
-TAGS="bindata sqlite sqlite_unlock_notify" make generate build test-sqlite
+TAGS="bindata sqlite sqlite_unlock_notify" make build test-sqlite
```
will run the integration tests in an sqlite environment. Other database tests