You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/hacking-on-gitea.en-us.md
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -128,10 +128,28 @@ make revive vet misspell-check
128
128
129
129
### Working on JS and CSS
130
130
131
-
Edit files in `web_src` and run the linter and build the files in `public`:
131
+
For simple changes, edit files in `web_src`, run the build and start the server to test:
132
132
133
133
```bash
134
-
make webpack
134
+
make build && ./gitea
135
+
```
136
+
137
+
For more involved changes use the `watch-frontend` task to continuously rebuild files when their sources change. The `bindata` tag must be absent to ensure the file system will be used for files in `public`. First, build and run the backend:
138
+
139
+
```bash
140
+
make backend && ./gitea
141
+
```
142
+
143
+
With the backend running, open another terminal and run:
144
+
145
+
```bash
146
+
make watch-frontend
147
+
```
148
+
149
+
Before committing, make sure the linters pass:
150
+
151
+
```bash
152
+
make lint-frontend
135
153
```
136
154
137
155
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.
0 commit comments