Skip to content

Instantly share code, notes, and snippets.

@kmtr
Last active December 17, 2015 03:08
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 kmtr/5540560 to your computer and use it in GitHub Desktop.
Save kmtr/5540560 to your computer and use it in GitHub Desktop.
Gruntfile.coffee jade, coffee, stylus
module.exports = (grunt)->
grunt.initConfig
jade:
compile:
files:[
expand: true
cwd: 'src/jade/'
src: '*.jade'
dest: 'build/'
ext: '.html']
coffee:
compile:
expand: true
flatten: false
cwd: 'src/coffee'
src: ['*.coffee']
dest: 'build/assets/lib/js/'
ext: '.js'
options:
bare: true
join: true
stylus:
compile:
files:[
expand: true
cwd: 'src/stylus/'
src: '*.styl'
dest: 'build/assets/lib/css'
ext: '.css']
watch:
jade:
files: 'src/jade/*.jade'
tasks: ['jade']
coffee:
files: 'src/coffee/*.coffee'
tasks: ['coffee']
stylus:
files: 'src/stylus/*.styl'
tasks: ['stylus']
grunt.registerTask 'default', ['jade', 'coffee', 'stylus']
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-watch'
### package.json
{
"dependencies": {
"jade": "~0.30.0",
"coffee-script": "~1.6.2",
"stylus": "~0.32.1"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jade": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-stylus": "~0.5.0",
"grunt-contrib-watch": "~0.3.1"
}
}
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment