GruntFile.coffee 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = (grunt) ->
  2. # Project configuration.
  3. grunt.initConfig
  4. coffee:
  5. server:
  6. expand: true,
  7. flatten: false,
  8. cwd: 'app/coffee',
  9. src: ['**/*.coffee'],
  10. dest: 'app/js/',
  11. ext: '.js'
  12. app_server:
  13. expand: true,
  14. flatten: false,
  15. src: ['app.coffee'],
  16. dest: './',
  17. ext: '.js'
  18. server_tests:
  19. expand: true,
  20. flatten: false,
  21. cwd: 'test/unit/coffee',
  22. src: ['*.coffee', '**/*.coffee'],
  23. dest: 'test/unit/js/',
  24. ext: '.js'
  25. watch:
  26. server_coffee:
  27. files: ['app/*.coffee','app/**/*.coffee', 'test/unit/coffee/**/*.coffee', 'test/unit/coffee/*.coffee', "app.coffee"]
  28. tasks: ["clean", 'coffee', 'mochaTest']
  29. clean: ["app/js", "test/unit/js", "app.js"]
  30. nodemon:
  31. dev:
  32. options:
  33. file: 'app.js'
  34. concurrent:
  35. dev:
  36. tasks: ['nodemon', 'watch']
  37. options:
  38. logConcurrentOutput: true
  39. mochaTest:
  40. test:
  41. options:
  42. reporter: process.env.MOCHA_RUNNER || "spec"
  43. src: ['test/*.js', 'test/**/*.js']
  44. grunt.loadNpmTasks 'grunt-contrib-coffee'
  45. grunt.loadNpmTasks 'grunt-contrib-watch'
  46. grunt.loadNpmTasks 'grunt-nodemon'
  47. grunt.loadNpmTasks 'grunt-contrib-clean'
  48. grunt.loadNpmTasks 'grunt-concurrent'
  49. grunt.loadNpmTasks 'grunt-mocha-test'
  50. grunt.registerTask "ci", ["coffee", "mochaTest"]
  51. grunt.registerTask 'default', ['coffee', 'concurrent']
  52. grunt.registerTask "install", "coffee"