Skip to content

Instantly share code, notes, and snippets.

@ovcharik
Created June 14, 2014 07:19
Show Gist options
  • Save ovcharik/bf7986f4387bd858d992 to your computer and use it in GitHub Desktop.
Save ovcharik/bf7986f4387bd858d992 to your computer and use it in GitHub Desktop.
Gruntfile for clientside haml templates
module.exports = (grunt) ->
grunt.initConfig
haml:
compile:
options:
namespace: 'window.wa.templates'
language: 'js'
target: 'js'
includePath: true
pathRelativeTo: 'app/assets/haml'
files:
'app/assets/javascripts/templates.js': ['app/assets/haml/**/*.haml']
watch:
haml:
files: 'app/assets/haml/**/*.haml'
tasks: 'haml'
grunt.loadNpmTasks 'grunt-haml'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'default', ['haml']
grunt.registerTask 'mywatch', ['default', 'watch']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment