summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-10-05 16:06:19 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-05 16:06:19 +0200
commitd173fcdfa3ad6f6aee721c8553f25f4db38fa302 (patch)
tree722cdaf93e090edcf83769ae763731008daf5fd3 /CONTRIBUTING.md
parentupdates markdown parsing to reduce allocations in the same way as the plain t... (diff)
downloadgotosocial-d173fcdfa3ad6f6aee721c8553f25f4db38fa302.tar.xz
[chore] Convert some settings / admin panel JS to TypeScript (#2247)
* initial conversion of STUFF to typescript * more stuff * update babel deps, include commonjs transform * update bundler & eslint configuration * eslint --fix * upgrade deps * update docs, build stuff, peripheral stuff --------- Co-authored-by: f0x <f0x@cthu.lu>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md27
1 files changed, 20 insertions, 7 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8b8721def..c8218564d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -226,31 +226,44 @@ To bundle changes, you need [Node.js](https://nodejs.org/en/download/) and [Yarn
Using [NVM](https://github.com/nvm-sh/nvm) is one convenient way to install them which also supports managing different Node versions.
-To install Yarn dependencies:
+To install frontend dependencies:
```bash
-yarn install --cwd web/source
+yarn --cwd web/source
```
-To recompile bundles:
+To recompile frontend bundles into `web/assets/dist`:
```bash
-node web/source
+yarn --cwd web/source build
```
#### Live Reloading
For a more convenient development environment, you can run a livereloading version of the bundler alongside the [testrig](#testing).
-Open two terminals, first start the testrig on port 8081:
+First build the GtS binary with DEBUG=1 to enable the testrig:
+
``` bash
-GTS_PORT=8081 go run ./cmd/gotosocial testrig start
+DEBUG=1 ./scripts/build.sh
```
+
+Now open two terminals.
+
+In the first terminal, run the testrig on port 8081, using the binary you just built:
+
+```bash
+DEBUG=1 GTS_PORT=8081 ./gotosocial testrig start
+```
+
Then start the bundler, which will run on port 8080, and proxy requests to the testrig instance where needed.
+
``` bash
-NODE_ENV=development node web/source
+NODE_ENV=development yarn --cwd ./web/source dev
```
+You can then log in to the GoToSocial settings panel at `http://localhost:8080/settings` and see your changes reflected in real time as the dev bundler reloads.
+
The livereloading bundler *will not* change the bundled assets in `dist/`, so once you are finished with changes and want to deploy it somewhere, you have to run `node web/source` to generate production-ready bundles.
### Project Structure