GeezerVison is showing github.com — Compile CoffeeScript to JavaScript · msgflo/msgflo@fcab0a8
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .gitignore +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,5 +4,6 @@ mosquitto* |
4 | 4 | spec/protocoltemp/ |
5 | 5 | Gemfile.lock |
6 | 6 | dist/ |
| 7 | +lib/ |
7 | 8 | *.pem |
8 | 9 |
|
Collapse file
Copy file name to clipboardExpand all lines: Gruntfile.coffee +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,6 +4,25 @@ module.exports = -> |
4 | 4 | @initConfig |
5 | 5 | pkg: pkg |
6 | 6 |
|
| 7 | + # CoffeeScript compilation |
| 8 | + coffee: |
| 9 | + library: |
| 10 | + options: |
| 11 | + bare: true |
| 12 | + expand: true |
| 13 | + cwd: 'src' |
| 14 | + src: ['**.coffee'] |
| 15 | + dest: 'lib' |
| 16 | + ext: '.js' |
| 17 | + utils: |
| 18 | + options: |
| 19 | + bare: true |
| 20 | + expand: true |
| 21 | + cwd: 'src/utils' |
| 22 | + src: ['**.coffee'] |
| 23 | + dest: 'lib/utils' |
| 24 | + ext: '.js' |
| 25 | + |
7 | 26 | # BDD tests on Node.js |
8 | 27 | mochaTest: |
9 | 28 | nodejs: |
@@ -48,6 +67,7 @@ module.exports = -> |
48 | 67 | src: '**/*' |
49 | 68 |
|
50 | 69 | # Grunt plugins used for building |
| 70 | + @loadNpmTasks 'grunt-contrib-coffee' |
51 | 71 | @loadNpmTasks 'grunt-jekyll' |
52 | 72 |
|
53 | 73 | # Grunt plugins used for testing |
@@ -65,6 +85,7 @@ module.exports = -> |
65 | 85 | ] |
66 | 86 |
|
67 | 87 | @registerTask 'test', 'Build and run automated tests', (target = 'all') => |
| 88 | + @task.run 'coffee' |
68 | 89 | @task.run 'mochaTest' |
69 | 90 | # @task.run 'fbp-test' |
70 | 91 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: package.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
32 | 32 | "fbp-protocol": "^0.8.0", |
33 | 33 | "fbp-spec": "^0.2.0", |
34 | 34 | "grunt": "~1.0.1", |
| 35 | + "grunt-contrib-coffee": "^2.0.0", |
35 | 36 | "grunt-gh-pages": "^2.0.0", |
36 | 37 | "grunt-jekyll": "^0.4.6", |
37 | 38 | "grunt-mocha-test": "^0.13.2", |
|