Skip to content

Instantly share code, notes, and snippets.

@chriskief
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskief/9266098 to your computer and use it in GitHub Desktop.
Save chriskief/9266098 to your computer and use it in GitHub Desktop.
module.exports = (grunt) ->
# configuration
grunt.initConfig
# grunt sass
sass:
compile:
options:
style: 'expanded'
files: [
expand: true
cwd: 'lib/sass'
src: ['**/*.scss']
dest: 'lib/css'
ext: '.css'
]
# grunt coffee
coffee:
compile:
expand: true
cwd: 'lib/coffee'
src: ['**/*.coffee']
dest: 'lib/js'
ext: '.js'
options:
bare: true
preserve_dirs: true
# grunt watch (or simply grunt)
watch:
html:
files: ['**/*.html']
sass:
files: '<%= sass.compile.files[0].src %>'
tasks: ['sass']
coffee:
files: '<%= coffee.compile.src %>'
tasks: ['coffee']
options:
livereload: true
# load plugins
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
# tasks
grunt.registerTask 'default', ['sass', 'coffee', 'watch']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment