requirejs-hogan-plugin icon indicating copy to clipboard operation
requirejs-hogan-plugin copied to clipboard

Possible to use shim instead of forked hogan.js?

Open morewry opened this issue 11 years ago • 2 comments

I've been wondering if it's possible to use a shim and the vanilla hogan.js file rather than the require-wrapped alternative version provided here.

Tried it and it doesn't work out of the box--is it possible? What would be needed to accomplish that?

morewry avatar Mar 13 '13 15:03 morewry

Well, you can do it but unless you really need it, it's not worth the effort. The nice thing of having a wrapped version of the plugin is that it makes use of features like pragmas (the plugin code is excluded from the output file generated by r.js) and module definition provided by RequireJS.

rafaelrinaldi avatar Jul 14 '13 04:07 rafaelrinaldi

@morewry what issue were you encountering? I'm looking over the plugin source and looks like it should work so long as your path is named hogan. Like:

require.config({
  paths: {
    "hogan": "path/to/your/hogan",
    "hgn": "path/to/requirejs-hogan-plugin/hgn"
  }
});

tbranyen avatar Oct 06 '13 06:10 tbranyen