gruntjs / grunt-contrib-handlebars

Precompile Handlebars templates to JST file.
http://gruntjs.com/
MIT License
282 stars 126 forks source link

AMD requires 'handlebars' instead of just 'handlebars.runtime' #143

Open foundryspatial-duncan opened 9 years ago

foundryspatial-duncan commented 9 years ago

If I use this plugin with just the one option amd: true, the output will be quite different from running the command line compiler with just the -a (AMD) option.

In particular, the command line compiler only requires handlebars.runtime while the plugin's output requires the whole handlebars.

Is there a way to get the grunt task to output the same as the CLI compiler with the same options? And/or just some way to get it to require the runtime instead of the whole thing?

ffflabs commented 6 years ago

instead of

  options: {
    amd: true
  }

you can use

  options: {
    amd: 'handlebars.runtime'
  }