Skip to content

Instantly share code, notes, and snippets.

@DrMartiner
Created November 18, 2013 08:48
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 DrMartiner/7524683 to your computer and use it in GitHub Desktop.
Save DrMartiner/7524683 to your computer and use it in GitHub Desktop.
gruntfile.coffee
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
coffee:
files: ['static/coffee/**/*.coffee']
tasks: ['coffee:dist']
less:
files: ['static/css/**/*.less']
tasks: ['less:dist']
coffee:
dist:
files: [{
expand: true,
cwd: 'static/coffee',
src: '**/*.coffee',
dest: 'static/js',
ext: '.js'
}]
less:
dist:
options:
paths: ["static/css/less"]
files:
"static/css/style.css": "static/css/less/style.less"
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.registerTask 'run', [
'coffee:dist',
'less:dist',
'watch'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment