coffee.js 781 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Compile CoffeeScript files to JavaScript.
  3. *
  4. * ---------------------------------------------------------------
  5. *
  6. * Compiles coffeeScript files from `assest/js` into Javascript and places them into
  7. * `.tmp/public/js` directory.
  8. *
  9. * For usage docs see:
  10. * https://github.com/gruntjs/grunt-contrib-coffee
  11. */
  12. module.exports = function(grunt) {
  13. grunt.config.set('coffee', {
  14. dev: {
  15. options: {
  16. bare: true,
  17. sourceMap: true,
  18. sourceRoot: './'
  19. },
  20. files: [{
  21. expand: true,
  22. cwd: 'assets/js/',
  23. src: ['**/*.coffee'],
  24. dest: '.tmp/public/js/',
  25. ext: '.js'
  26. }, {
  27. expand: true,
  28. cwd: 'assets/js/',
  29. src: ['**/*.coffee'],
  30. dest: '.tmp/public/js/',
  31. ext: '.js'
  32. }]
  33. }
  34. });
  35. grunt.loadNpmTasks('grunt-contrib-coffee');
  36. };