tj / consolidate.js

Template engine consolidation library for node.js
3.48k stars 353 forks source link

appended partial extension should be optional/removed #272

Open stevenvachon opened 7 years ago

stevenvachon commented 7 years ago

https://github.com/tj/consolidate.js/blob/v.0.14.0/lib/consolidate.js#L120

With a template named template.html.hbs, we cannot do this:

const options = {
  partials: {
    "name": "path/to/partial.html.hbs"
  }
};

and must instead do this:

const options = {
  partials: {
    "name": "path/to/partial.html"
  }
};

We're forced to remove the .hbs extension so that this library can append it (from the main template's extension). If this functionality is not useful to anyone, we should remove it completely, but can make it optional otherwise.