Damn simple coffeescript watch and compiling with grunt
Using a folder structure as follows
module.exports = (grunt) ->
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.initConfig
watch:
coffee:
files: 'src/*.coffee'
tasks: ['coffee:compile']
coffee:
compile:
expand: true,
flatten: true,
cwd: "#{__dirname}/src/",
src: ['*.coffee'],
dest: 'js/',
ext: '.js'
You are welcome
Written by Sam Saccone
Related protips
1 Response
Concise. Simple. Valid.
Thank you, Sir!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Compile
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#