Skip to content

Instantly share code, notes, and snippets.

@fatihacet
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihacet/95c8de3a057e5d0cca9d to your computer and use it in GitHub Desktop.
Save fatihacet/95c8de3a057e5d0cca9d to your computer and use it in GitHub Desktop.
Sample Gruntfile
module.exports = (grunt) ->
grunt.initConfig
coffee :
options :
bare : yes
src :
files : [
expand : yes
cwd : 'src'
src : [ '**/*.coffee' ]
dest : 'build/js/'
ext : '.js'
]
tests :
files : [
expand : yes
cwd : 'tests'
src : [ '**/*.coffee' ]
dest : 'build/tests/'
ext : '.js'
]
watch :
options :
livereload : yes
interrupt : yes
src :
files : [ 'src/**/*.coffee' ]
tasks : [ 'coffee:src' ]
tests :
files : [ 'tests/**/*.coffee' ]
tasks : [ 'coffee:tests' ]
grunt.loadNpmTasks 'grunt-npm'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', 'Default task', ->
grunt.task.run [
'coffee'
'watch'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment