@@ -40,63 +40,37 @@ the Opentip directory:
40
40
$ npm install
41
41
```
42
42
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 .
45
45
46
- To compile (build) and bundle the library use ` cake ` .
46
+ To get a list of available commands use ` grunt -h ` .
47
47
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
50
49
51
50
``` 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
57
52
```
58
53
59
- To compile all source files:
54
+ This will observe any change to a coffeescript or stylus file and compile it
55
+ immediately.
60
56
61
- ``` bash
62
- $ cd path/to/opentip-source
63
- $ cake build
64
- ```
65
57
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.
69
60
70
61
71
62
### Testing
72
63
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.
88
68
89
69
It should look like this:
90
70
91
71
![ Tests screenshot] ( https://raw.github.com/enyo/opentip/develop/files/tests.png )
92
72
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.
100
74
101
75
If you add a change, please make sure that all tests pass!
102
76
0 commit comments