Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.34 KB

CONTRIBUTING.md

File metadata and controls

26 lines (16 loc) · 1.34 KB

Getting started

  1. git clone [email protected]:TGlas/tscript.git
  2. install nodejs and npm
  3. run npm ci
  • To build run npm run build
  • To run the unittest npm test
  • To watch for changes and compile run npm run dev

Using prettier

This project uses Prettier for code formatting. Many editors have plugins for Prettier (listed under "Editor Support"), which ensure that the editor automatically applies the correct style when reformatting files. If you need to do so manually, there are two commands that can help you:

  • npm run test:fmt checks that the project is properly formatted
  • npm run prettier reformats the project

If the check-format check fails on your pull request, it's most likely enough to run npm run prettier and commit the changes.

If there's something that Prettier complains about that you absolutely need to be formatted in a specific way, you can use prettier-ignore comments to tell prettier to ignore a part of a file (see documentation).

Generating the resources

Various resources like icons are created by code. To generate the corresponding data, which is included in the website, special scripts need to be executed.

  • npm run gen-icons generates the icon resources, you might need to call npm run gen-icons && npm run prettier