Skip to content

Commit f7851a9

Browse files
committed
Updated the contributing guidelines.
1 parent 593d57b commit f7851a9

File tree

1 file changed

+14
-40
lines changed

1 file changed

+14
-40
lines changed

CONTRIBUTING.md

+14-40
Original file line numberDiff line numberDiff line change
@@ -40,63 +40,37 @@ the Opentip directory:
4040
$ npm install
4141
```
4242

43-
This will setup Coffeescript, Stylus and a few other dependencies to build and
44-
bundle the library.
43+
This will setup [Grunt](http://gruntjs.com) so you can compile Coffeescript and
44+
Stylus and generate the download files.
4545

46-
To compile (build) and bundle the library use `cake`.
46+
To get a list of available commands use `grunt -h`.
4747

48-
Just type the command without any arguments `$ cake` in the source directory to
49-
list all commands available. It will look something like this:
48+
The most important command is
5049

5150
```bash
52-
cake docs # generate documentation
53-
cake build # compile source
54-
cake watch # compile and watch
55-
cake css # compile stylus
56-
cake watchcss # compile and watch stylus
51+
$ grunt watch
5752
```
5853

59-
To compile all source files:
54+
This will observe any change to a coffeescript or stylus file and compile it
55+
immediately.
6056

61-
```bash
62-
$ cd path/to/opentip-source
63-
$ cake build
64-
```
6557

66-
> I prefer pull requests that only changed `.coffee` and `.stylus` files, since
67-
> I only checkin the `.css` and `.js` files before a release. But I accept
68-
> pull requests that contain the compiled files as well.
58+
> Please only submit commits with changed `.coffee` and `.stylus` files and do
59+
> *not* include the compiled JS or CSS files.
6960
7061

7162
### Testing
7263

73-
Go into the `test/` directory and install all dependencies. (You only have
74-
to do this the first time):
75-
76-
```bash
77-
$ cd test/
78-
$ npm install
79-
```
80-
81-
And you're ready to launch the server:
82-
83-
```bash
84-
$ ./server.js
85-
```
86-
87-
Now simply visit `http://localhost:3000` in your browser to see the tests.
64+
To test the library make sure that the source has been compiled with `grunt js`
65+
(as mentioned before, use `grunt watch` to always stay up to date) and then
66+
either type `npm test` to run the tests on the command line, or open the
67+
file `test/test.html` in a browser.
8868

8969
It should look like this:
9070

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

93-
All tests are located in `assets/js/tests/` and are written in coffeescript but
94-
compiled on the fly.
95-
96-
The webserver also automatically compiles any opentip changes (as well as the
97-
adapter changes), so don't worry about compiling coffeescript. When the time
98-
comes to deploy everything, I'll take care of properly bundling all Javascript
99-
files.
73+
All tests are located in `test/src` and are written in coffeescript.
10074

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

0 commit comments

Comments
 (0)