davis / plugin-hbs

Handlebars template loader plugin for SystemJS
MIT License
21 stars 9 forks source link

Remove indirect injected dependancy on handlebars in consuming config.js #4

Closed milkshakeuk closed 8 years ago

milkshakeuk commented 8 years ago

Currently whilst using this plugin in a project your have to add a direct dependency to handlebars as well otherwise systemjs gets upset when expecting handlebars to be configured in your systemjs config.js.

System.config({
...
 map: {
    "handlebars": "github:components/handlebars.js@4.0.3",
    "github:davis/plugin-hbs@1.1.0": {
      "handlebars": "github:components/handlebars.js@4.0.3"
    },
...
});

with this pull request the consumer only needs to directly depend on your plugin i.e. by running: jspm install hbs.

which then makes their config.js look like:

System.config({
...
 map: {
    "github:davis/plugin-hbs@1.1.0": {
      "handlebars": "github:components/handlebars.js@4.0.3"
    },
...
});
davis commented 8 years ago

Ah, thank you! @MeoMix should be happy now :) And good call on switching to instantiate.

MeoMix commented 8 years ago

:clap: THANK YOU

milkshakeuk commented 8 years ago

@davis thanks for merging in the pull request :+1: