mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-21 18:27:41 +00:00
move CSS build to webpack (#9983)
- added new 'make webpack' target - deprecated 'make js' and 'make css' - extend webpack config to load the less files - updated docs I had to rename the source file of `arc-green.less` to avoid generating a useless JS entrypoint via webpack-fix-style-only-entries which would not work with different source/destination filenames. I hear that there should be cleaner solutions possible once we upgrade to Webpack 5. Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@@ -140,24 +140,21 @@ You should run revive, vet and spell-check on the code with:
|
|||||||
make revive vet misspell-check
|
make revive vet misspell-check
|
||||||
```
|
```
|
||||||
|
|
||||||
### Working on CSS
|
### Working on JS and CSS
|
||||||
|
|
||||||
Edit files in `web_src/less` and run the linter and build the CSS files via:
|
Edit files in `web_src` and run the linter and build the files in `public`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make css
|
make webpack
|
||||||
```
|
|
||||||
|
|
||||||
### Working on JS
|
|
||||||
|
|
||||||
Edit files in `web_src/js`, run the linter and build the JS files via:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
make js
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: When working on frontend code, it is advisable to set `USE_SERVICE_WORKER` to `false` in `app.ini` which will prevent undesirable caching of frontend assets.
|
Note: When working on frontend code, it is advisable to set `USE_SERVICE_WORKER` to `false` in `app.ini` which will prevent undesirable caching of frontend assets.
|
||||||
|
|
||||||
|
### Building Images
|
||||||
|
|
||||||
|
To build the images, ImageMagick, `inkscape` and `zopflipng` binaries must be available in
|
||||||
|
your `PATH` to run `make generate-images`.
|
||||||
|
|
||||||
### Updating the API
|
### Updating the API
|
||||||
|
|
||||||
When creating new API routes or modifying existing API routes, you **MUST**
|
When creating new API routes or modifying existing API routes, you **MUST**
|
||||||
|
|||||||
Reference in New Issue
Block a user