Gruntfile.coffee 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. unit:
  41. src: ["test/unit/js/#{grunt.option('feature') or '**'}/*.js"]
  42. options:
  43. reporter: grunt.option('reporter') or 'spec'
  44. grep: grunt.option("grep")
  45. grunt.loadNpmTasks 'grunt-contrib-coffee'
  46. grunt.loadNpmTasks 'grunt-contrib-watch'
  47. grunt.loadNpmTasks 'grunt-nodemon'
  48. grunt.loadNpmTasks 'grunt-contrib-clean'
  49. grunt.loadNpmTasks 'grunt-concurrent'
  50. grunt.loadNpmTasks 'grunt-mocha-test'
  51. grunt.registerTask "test:unit", ["coffee", "mochaTest:unit"]
  52. grunt.registerTask "ci", "test:unit"
  53. grunt.registerTask 'default', ['coffee', 'concurrent']
  54. grunt.registerTask "compile", "coffee"
  55. grunt.registerTask "install", "compile"