1 This repository contains SVR.JS mod starter code and its build system
2 The mod will work for SVR.JS Nightly-GitNext.
4 Before doing anything, run "npm install".
5 To build SVR.JS mod, run "npm run build".
6 To check SVR.JS mod code for errors with ESLint, run "npm run lint".
7 To fix and beautify SVR.JS mod code with ESLint and Prettier, run "npm run lint:fix".
8 To perform unit tests with Jest, run "npm test".
11 1. Clone the SVR.JS repository with "git clone https://git.svrjs.org/svrjs/svrjs.git" command.
12 2. Change the working directory to "svrjs" using "cd svrjs".
13 3. Build SVR.JS by first running "npm install" and then running "npm run build".
14 4. Copy the mod into mods directory in the dist directory using "cp ../dist/mod.js dist/mods" (GNU/Linux, Unix, BSD) or "copy ..\dist\mod.js dist\mods" (Windows).
15 5. Do the necessary mod configuration if the mod requires it.
16 6. Run SVR.JS by running "npm start".
17 7. Do some requests to the endpoints covered by the mod.
20 - dist - contains the built SVR.JS mod
21 - src - contains SVR.JS mod source code
22 - index.js - entry point
23 - utils - utility functions
24 - tests - Jest unit tests
25 - utils - unit tests for utility functions
26 - esbuild.config.js - the build script
27 - eslint.config.js - ESLint configuration
28 - jest.config.js - Jest configuration
29 - modInfo.json - SVR.JS mod name and version