patrickkettner / grunt-compile-handlebars

grunt plugin to compile static html from a handlebars plugin
MIT License
115 stars 29 forks source link

Local template data should merge onto global template data #14

Closed stimmins closed 10 years ago

stimmins commented 10 years ago

Currently, when using templateData and globals, properties from each globals object blindly overwrite the corresponding properties on the templateData object, and if the property is itself an object you will lose any sub-properties of that object.

Surely the desired method is for templateData objects to be gracefully merged into global objects, preserving all properties and sub-properties that have not been re-defined.

patrickkettner commented 10 years ago

great catch! thanks @stimmins

patrickkettner commented 10 years ago

I hope you add a PR to add yourself to the contributors file :]