1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-02 02:36:24 -07:00

Prevent build.py from deleting consts.js when installing frontend

This commit is contained in:
Eggbertx 2022-03-12 15:57:51 -08:00
parent bdc0ed41b5
commit 1d416bb52c
2 changed files with 15 additions and 10 deletions

View file

@ -1,5 +1,17 @@
# gochan.js development
## Before you start
To do frontend development for gochan, make sure you have Node JS and npm installed (the package names and installation methods may vary depending on distribution and OS).
Depending on your npm version, you may need to run this if you have the most up to date npm version available in your distro's repo but still get an error saying something like "Missing required argument #1" when you run `npm install`.
```
sudo npm install -g n
sudo n latest
sudo npm install -g npm
hash -d npm
npm install
```
(make sure you run these commands in the frontend directory)
## Building
You can technically use the npm build script directly for building gochan.js, but it's more convenient to just run `./build.py js` from the gochan repo root directory.
@ -9,12 +21,3 @@ To install your gochan.js after building it, run `./build.py install --js`.
## Testing
Gochan unit testing with [Jest](https://jestjs.io) is still in its early stages and can be run by calling `npm run test` from the frontend directory.
Depending on your npm version, you may need to run this if you have the most up to date npm version available in your distro's repo but still get an error saying something like "Missing required argument #1" when you run `npm install`.
```
sudo npm install -g n
sudo n latest
sudo npm install -g npm
hash -d npm
npm install
```