Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 1.93 KB

CONTRIBUTING.md

File metadata and controls

60 lines (35 loc) · 1.93 KB

Contributing

Firstly, thank you for taking the time to contribute! Contributions of any size are always appreciated.

The library is built using the node environment, so you need to have that already installed along with git. First you will need to fork then clone the repository and install the dependancies. If you are not sure how to do either of these things, check the github and npm documentation respectively.

Also, you may wish to have a look at the trainlink dev environment which is recommended for working on the whole project.

Choosing something to work on

If you have a feature in mind or a bug you'd like to fix, great! If not, have a look at the open issues and see if there is something you might like to work on.

Making changes

To help make your changes, you can view the documentation for the library here. Also, the documentation for the types library may be useful, which can be found here. Once you have made your changes and are ready to try them out, you can build the library using:

$ npm run build

Then before creating a PR, run the following commands:

$ npm test

to run the unit tests and check test coverage and:

$ npm run format

to format your code correctly.

Where possible, please try to write unit tests for any new code you write to prevent regressions in the future. Also, add JSDoc comments to methods and classes to help others understand what your code means!

Directory structure

.github

Stores all files related to GitHub Actions

dist

Contains the compiled Javascript output plus typesript type files

docs

Contains the autogenerated documentation files, these are built from JSDoc comments

src

Where all the source files are, this is generally where you want to be working

tests

Stores the unit test files