The basic layout of my typical Gruntfile.coffee is as follows
module.exports = (grunt) ->
grunt.initConfig
pkg:
grunt.file.readJSON 'package.json'
coffee:
compile:
files:
'lib/destination1.js': [
'src/source1.coffee'
'src/sourc2.coffee'
]
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.registerTask 'default', ['coffee']
Gruntfile.coffee is placed in the root of the project repository. Since the default task calls the coffee method, invoking grunt
will result in the compilation of all source files into the destination file.