File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11node_modules
2+ lib /
23.DS_Store
Original file line number Diff line number Diff line change @@ -3,6 +3,15 @@ module.exports = ->
33 @initConfig
44 pkg : @file .readJSON ' package.json'
55
6+ # CoffeeScript compilation
7+ coffee :
8+ library :
9+ expand : true
10+ cwd : ' src'
11+ src : [' **.coffee' ]
12+ dest : ' lib'
13+ ext : ' .js'
14+
615 # BDD tests on Node.js
716 mochaTest :
817 nodejs :
@@ -36,6 +45,7 @@ module.exports = ->
3645 @ loadNpmTasks ' grunt-mocha-test'
3746 @ loadNpmTasks ' grunt-coffeelint'
3847 @ loadNpmTasks ' grunt-shell-spawn'
48+ @ loadNpmTasks ' grunt-contrib-coffee'
3949
4050 # Our local tasks
4151 @ registerTask ' fbp-test' , [
@@ -44,8 +54,7 @@ module.exports = ->
4454 ' shell:msgflo:kill'
4555 ]
4656
47- @ registerTask ' build' , ' Build the chosen target platform' , (target = ' all' ) =>
48- # nothing
57+ @ registerTask ' build' , ' Build the chosen target platform' , [' coffee' ]
4958
5059 @ registerTask ' test' , ' Build and run automated tests' , (target = ' all' ) =>
5160 @task .run ' coffeelint'
Original file line number Diff line number Diff line change 1- require ( 'coffee-script/register' ) ;
2- module . exports = require ( './src/' ) ;
1+ try {
2+ // Compiled JavaScript first
3+ module . exports = require ( './lib/' ) ;
4+ } catch ( e ) {
5+ require ( 'coffee-script/register' ) ;
6+ module . exports = require ( './src/' ) ;
7+ }
Original file line number Diff line number Diff line change 1919 "dependencies" : {
2020 "async" : " ^0.9.0" ,
2121 "chance" : " ^0.7.3" ,
22- "coffee-script" : " ^1.8.0" ,
2322 "commander" : " ^2.6.0" ,
2423 "debug" : " ^2.1.2" ,
2524 "fbp" : " ^1.1.2" ,
2827 },
2928 "devDependencies" : {
3029 "amqplib" : " ^0.3.0" ,
31- "mqtt" : " 1.4.x" ,
3230 "chai" : " ~1.9.0" ,
3331 "grunt" : " ~0.4.1" ,
32+ "coffee-script" : " ^1.8.0" ,
3433 "grunt-coffeelint" : " ~0.0.6" ,
34+ "grunt-contrib-coffee" : " ^1.0.0" ,
3535 "grunt-mocha-test" : " ^0.12.2" ,
3636 "grunt-shell-spawn" : " ^0.3.1" ,
37- "mocha" : " ~1.21.0"
37+ "mocha" : " ~1.21.0" ,
38+ "mqtt" : " 1.4.x"
3839 },
3940 "keywords" : [],
4041 "bin" : {
You can’t perform that action at this time.
0 commit comments