From 231071663becb940653940cdd6974c3d4ea7755a Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 28 Jan 2020 08:30:39 +0100 Subject: [PATCH] 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 --- doc/advanced/hacking-on-gitea.en-us.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/doc/advanced/hacking-on-gitea.en-us.md b/doc/advanced/hacking-on-gitea.en-us.md index fd7e9626..fdccdf19 100644 --- a/doc/advanced/hacking-on-gitea.en-us.md +++ b/doc/advanced/hacking-on-gitea.en-us.md @@ -140,24 +140,21 @@ You should run revive, vet and spell-check on the code with: 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 -make css -``` - -### Working on JS - -Edit files in `web_src/js`, run the linter and build the JS files via: - -```bash -make js +make webpack ``` 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 When creating new API routes or modifying existing API routes, you **MUST**