Skip to content

Instantly share code, notes, and snippets.

@vmakhaev
Created January 3, 2014 12:18
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 vmakhaev/8237046 to your computer and use it in GitHub Desktop.
Save vmakhaev/8237046 to your computer and use it in GitHub Desktop.
module.exports = (grunt) ->
grunt.initConfig
coffee:
src:
options:
bare: true
sourceMap: true
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'lib'
ext: '.js'
ui:
options:
bare: true
sourceMap: true
expand: true
cwd: 'ui'
src: ['**/*.coffee']
dest: 'ui'
ext: '.js'
other:
options:
bare: true
sourceMap: true
files:
'server.js': 'server.coffee'
watch:
options:
spawn: false
app:
files: '**/*.coffee'
tasks: ['newer:coffee']
grunt.registerTask 'server',(target) ->
node = grunt.util.spawn
cmd: 'node'
args: ['server.js']
node.stdout.pipe process.stdout
node.stderr.pipe process.stderr
grunt.task.run ['watch']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-newer'
grunt.registerTask 'default', ['server']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment