File: CONTRIBUTING.md

package info (click to toggle)
node-opentip 2.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 2,580 kB
  • sloc: makefile: 28
file content (76 lines) | stat: -rw-r--r-- 2,080 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
Contribute
==========

The latest stable version is always in the **[master](https://github.com/enyo/opentip)** branch (which always
points at the latest version tag).

The latest development version is in the **[develop](https://github.com/enyo/opentip/tree/develop)** branch.

> Use the develop branch if you want to contribute or test features.

Please do also **send pull requests to the `develop` branch**.
I will **not** merge pull requests to the `master` branch.


Make sure that changes pass all [tests](#testing).


### Coffeescript & Stylus (-> Javascript & CSS)

Opentip is written in [Coffeescript](http://coffeescript.org) and
[Stylus](http://learnboost.github.com/stylus/) so *do not* make
changes to the Javascript or CSS files

**I will not merge requests written in Javascript or CSS.**

Getting started
---------------

You need node to compile and test Opentip. So [install node](http://nodejs.org)
first if you haven't done so already.


### Building Opentip


First you have to setup the node modules to build Opentip. Simply run this in
the Opentip directory:

```bash
$ npm install
```

This will setup [Grunt](http://gruntjs.com) so you can compile Coffeescript and
Stylus and generate the download files.

To get a list of available commands use `grunt -h`.

The most important command is

```bash
$ grunt watch
```

This will observe any change to a coffeescript or stylus file and compile it
immediately.


> Please only submit commits with changed `.coffee` and `.stylus` files and do
> *not* include the compiled JS or CSS files.


### Testing

To test the library make sure that the source has been compiled with `grunt js`
(as mentioned before, use `grunt watch` to always stay up to date) and then
either type `npm test` to run the tests on the command line, or open the
file `test/test.html` in a browser.

It should look like this:

![Tests screenshot](https://raw.github.com/enyo/opentip/develop/files/tests.png)

All tests are located in `test/src` and are written in coffeescript.

If you add a change, please make sure that all tests pass!