j3gxsa
Last Updated: February 25, 2016
·
6.17K
· samccone
41041169880bec75fbe51de48443cefb

Damn simple coffeescript watch and compiling with grunt

Using a folder structure as follows

Picture

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

Say Thanks
Respond

1 Response
Add your response

16779
953c8523a79569f1527c67cf8f89e0b9

Concise. Simple. Valid.
Thank you, Sir!

over 1 year ago ·