-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update contribution guide for new v4 build
- Loading branch information
Showing
1 changed file
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
# Contributing to Cal-Heatmap | ||
|
||
## Editing source file | ||
## About the code | ||
|
||
All edition should be done on `src/cal-heatmap.js`. | ||
* The source code is located in the `src` folder | ||
* All tests are locacted in the `test` folder | ||
* Code is written in Typescript | ||
|
||
**DO NOT** edit javascripts file located in the root, as they're built via grunt. | ||
## Getting started | ||
|
||
## Building final javascripts | ||
Clone/Download the repository, then run `npm install` | ||
to insure you have all the required dev dependencies. | ||
|
||
## Code formatting | ||
|
||
Cal-Heatmap uses `grunt` to build final javascripts and stylesheets. | ||
* Code is formatted with ESLint/Prettier. See `.eslintrc.json` and `prettierrc` | ||
|
||
Install grunt via | ||
You can also trigger: | ||
* the lint with `npm run lint` | ||
* an auto-formatting with `npm run format` | ||
|
||
npm install -g grunt-cli | ||
Ensure your code is formatted correctly before opening a pull request | ||
|
||
then run | ||
## Building bundle | ||
|
||
grunt build | ||
As a developer, you should use `npm run dev` while developing, | ||
as it produces a slimer and faster bundle. | ||
|
||
## Tests | ||
|
||
Cal-Heatmap is tested with [Qunit](https://qunitjs.com/). | ||
|
||
Tests files are located in the `test` directory, and can be run by opening the `index.html` file. | ||
The code is built with Rollup, with `npm run build`. This command is run | ||
from the CI when releasing a new tag, as the bundle are not versioned. | ||
|
||
If you want to add or edit existing tests, **do not** edit the `test/test.js` file. Instead, add them in `test/src`, under the corresponding module. Take a look at existing tests for reference. | ||
|
||
You can then run `grunt build` to generate the final `test/test.js` file. | ||
## Tests | ||
|
||
## Submitting changes | ||
Cal-Heatmap is tested with Jest. | ||
|
||
Submit your pull requests with only files located in `src` folders. Do not commit files generated by grunt (.js located in the root and `test/test.js`). | ||
Tests are run with `npm run test` |