1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-06 05:26:22 -07:00
gochan/frontend
2022-01-29 20:02:50 -08:00
..
src Add cookie tests 2022-01-29 20:02:50 -08:00
tests Add cookie tests 2022-01-29 20:02:50 -08:00
types Turn staff action map into an array for more control over ordering 2022-01-01 16:03:39 -08:00
.babelrc Add ES6 frontend so far 2020-06-03 15:43:35 -07:00
gulpfile.babel.js update npm packages, use fancy_log in gulpfile 2021-08-19 14:46:10 -07:00
jest.config.mjs Add Jest for JavaScript testing 2022-01-27 23:26:30 -08:00
package-lock.json Add Jest for JavaScript testing 2022-01-27 23:26:30 -08:00
package.json Add Jest for JavaScript testing 2022-01-27 23:26:30 -08:00
README.md Clarify info on potential jest installation issues 2022-01-29 11:52:39 -08:00

gochan.js development

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.

If you want to build it without minification, run ./build.py js --nominify. If you want to have it watch the JS files for changes and rebuild them when you make any in realtime, use the --watch flag.

To install your gochan.js after building it, run ./build.py install --js.

Testing

Gochan unit testing with Jest 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
npm install