New contributions to the library are always welcome, but please follow these guidelines below
Please use yarn or npm to install all the package.
You can run the compile script from package.json to generate the UMD versions of the library, bundle and the minified versions. Use the build script to run the linter as well as compiling the code afterwards.
In general formatting, please follow the EditorConfig guidelines for the project. You should be only editing code /src folder.
In terms of TypeScript, we use TSLint with the basic settings except two rule changes: quotemark is set to use single-quotes ('') and interface-name is set to never-prefix (i.e., we never prefix our interfaces with I). We have set up TSLint to check for code issues and calling the build script should automatically run the linter. Otherwise, you can also run the lint script to just run the linter.
We provide a nice and interactive demo for the library. This can be run by calling the demo script which will run the lint, compile the files and then run a simple http-server before routing to the index page.
Please follow the seven rules of a greate Git commit message. This means clean, consistent and understandable history. It would also be preferable that you squash your commits into one before submitting a final Pull Request, but that can also be done by us when we merge in your code.
Please create issues for any bugs in the code. Well structured, detailed bug reports are hugely valuable for the project.
Guidelines for reporting bugs:
- Check the issue search to see if it has already been reported
- Isolate the problem to a simple test case
- Please include steps to reproduce it. You can use the
demofolder from this repository to set it up.
Please provide any additional details associated with the bug, if it's browser or screen density specific, or only happens with a certain configuration or data.