Skip to content

Instantly share code, notes, and snippets.

@MaskRay
Created March 1, 2013 16:17
Show Gist options
  • Save MaskRay/5065716 to your computer and use it in GitHub Desktop.
Save MaskRay/5065716 to your computer and use it in GitHub Desktop.
Gruntfile.coffee
module.exports = (grunt) ->
'use strict'
grunt.initConfig
coffee:
debug:
files: [
expand: true
cwd: 'js'
src: ['**/*.coffee', '!**/_*.coffee']
dest: 'build/js'
ext: '.js'
]
stylus:
debug:
files: [
expand: true
cwd: 'css'
src: ['**/*.styl', '!**/_*.styl']
dest: 'build/css'
ext: '.css'
]
jade:
debug:
files: [
expand: true
src: ['*.jade', '!_*.jade']
dest: 'build'
ext: '.html'
]
watch:
coffee:
files: ['js/**/*.coffee']
tasks: ['coffee']
stylus:
files: ['css/**/*.styl']
tasks: ['stylus']
jade:
files: ['*.jade']
tasks: ['jade']
clean:
dev: ['*.html', 'css/style.css']
connect:
debug:
options:
port: 9999
host: '127.0.0.1'
base: 'build'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.registerTask 'debug', ['coffee:debug', 'stylus:debug', 'jade:debug']
grunt.registerTask 'dev', ['debug', 'connect:debug', 'watch']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment