Skip to content

Instantly share code, notes, and snippets.

@Grawl
Last active August 29, 2015 14:00
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 Grawl/11396423 to your computer and use it in GitHub Desktop.
Save Grawl/11396423 to your computer and use it in GitHub Desktop.
path=
dest:'./'
templates:'templates/'
styles:'styles/'
module.exports=(grunt) ->
grunt.initConfig
pkg:grunt.file.readJSON 'package.json'
sass:
compile:
options:
sourcemap:true
require:'rails-sass-images'
style:'compressed'
noCache:true
files:[
expand:true
cwd:path.styles
src:['*.sass']
dest:path.dest
ext:'.css'
]
autoprefixer:
compile:
options:
map:true
files:[
expand:true
flatten:true
src:'*.css'
dest:path.dest
]
jade:
compile:
options:
pretty: true
data:(dest,src) ->
return require('./templates/index.json')
files:[
expand:true
cwd:path.templates
src:['**/*.jade']
dest:path.dest
ext:'.html'
]
watch:
livereload:
files: [
'*.css'
'**/*.js'
'*.html'
]
options:
livereload: true
css:
files:'**/*.sass'
tasks:[
'sass'
'autoprefixer'
]
html:
files:'**/*.jade'
tasks:[
'newer:jade'
]
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.registerTask 'templates:newer',['newer:jade']
grunt.registerTask 'styles:newer',['newer:sass']
grunt.registerTask 'default',['watch']
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment