groupdock / grunt-handlebars

Grunt task for precompiling Handlebars template.
30 stars 14 forks source link

Watch task #3

Closed barraponto closed 12 years ago

barraponto commented 12 years ago

How should I write a watch task for handlebars?

timoxley commented 12 years ago

just use the built-in grunt watch and make sure the handlebars command is in the task list e.g.

    handlebars: {
      all: {
        src: 'src/templates',
        dest: 'public/js/templates.js'
      }
    },
    watch: {
      files: ['<config:lint.files>', 'src/templates/*.handlebars'],
      tasks: 'lint handlebars etc'
    },
timoxley commented 12 years ago

@barraponto did you sort this out?

barraponto commented 12 years ago

I canged back to underscore templates, due to other issues :P But I'll try and change to handlebars again, and provide feedback.

timoxley commented 12 years ago

No worries, let me know how it goes.