CONTRIBUTING.md 3.32 KB
Newer Older
Guillaume's avatar
Guillaume committed
1
# Contributing
neveldo's avatar
neveldo committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

You want to contribute to Mapael? That's great, first of all, thank you !

There are several ways you can contribute :

- **Wanna give a little hand?** Go to the [Issues](https://github.com/neveldo/jQuery-Mapael/issues) list and start helping people!

- **Found a bug?** Submit a [bug report](https://github.com/neveldo/jQuery-Mapael/issues) and describe your problem.

- **Add a new map** You can share your Map by submitting a Pull Request on the [mapael-maps repository](https://github.com/neveldo/mapael-maps).

- **Improve the documentation** The mapael documentation can be improved by submitting a Pull Request on the [mapael-documentation repository](https://github.com/neveldo/mapael-documentation).

- **Know how to resolve a bug / Want to add a feature?** Submit a Pull Request (*PR*). Your code will be reviewed and merged into Mapael (see link 2 below)

- **You want to help, but don't know what to do?** Check the [TODO list](https://github.com/neveldo/jQuery-Mapael/wiki/TODO-list) for features/issues we need/are working on.

Guillaume's avatar
Guillaume committed
19
Here are some readings: <https://guides.github.com/activities/contributing-to-open-source>
neveldo's avatar
neveldo committed
20

Guillaume's avatar
Guillaume committed
21
---
neveldo's avatar
neveldo committed
22

Guillaume's avatar
Guillaume committed
23
# Dev information
neveldo's avatar
neveldo committed
24

Guillaume's avatar
Guillaume committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
## Cloning the repository

Before making any modification to Mapael, you will need your own Mapael fork!

Here are some reading to get a local Mapael:
1. <https://help.github.com/articles/fork-a-repo/>
1. <http://kbroman.org/github_tutorial/pages/fork.html>

## Environment

Mapael uses [NPM](https://www.npmjs.com/) to manage package dependencies 
and [Grunt](https://gruntjs.com/) to run development tasks.

After cloning locally the Mapael repository, run this command-line:
```
npm install
```

Then you will be able to run all related Grunt tasks.

## Code quality

Mapael uses [JSHint](http://jshint.com/about/) to check code quality.
The rules are [explained in the Wiki](https://github.com/neveldo/jQuery-Mapael/wiki/JSHint).

You can run this check with the following command-line:
```
grunt jshint
```

## Test suite

There is a test suite in the `/test` folder, power by [QUnit](http://qunitjs.com/).
While not broken, it is, however, very light. We sadly don't have the time to expand it for now.

When submitting a new PR, it is not expected from you to add any tests. 
But if you feel like you can, please do so.

You can run this check with the following command-line 
(note: it will run JSHint, then the Test Suite):
```
grunt test
```

## Build (minimified version)

Mapael is distributed as a minified file for production (`jquery.mapael.min.js`).
[UglifyJS](http://lisperator.net/uglifyjs/) is used for this operation.

You can build it with the following command-line 
(note: it will run JSHint, then build the minimified files):
```
grunt build
```

When submitting a new PR, it is not expected from you to provide the minified version.
This version is usually generated by maintainers before tagging a new release.

## Continuous Integration (CI)

When submitting a new PR, you will see that [Travis](https://travis-ci.org/) (the CI tool)
will automatically run some tests on your code. It performs two tests:
1. Run JSHint to check code quality
2. Run the Test Suite to check regression

You will be able to check the result then, and perform adjustements if necessary
(by pushing a new commit to the branch).

These two tests are expected to pass when submitting a new PR.
Please check your code so