-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
excludeHbsParser does not seem to have any effect #244
Comments
I was able to achieve the right build without having to fork the code: stubModules: ['hbs', 'hbs/underscore', 'hbs/json2'],
onBuildWrite: function (moduleName, path, contents) {
if (moduleName === 'hbs/handlebars') {
return grunt.file.read('vendor/require-handlebars-plugin/hbs/handlebars.runtime.js')
.replace('define(factory);', 'define(\'hbs/handlebars\', factory);');
} else {
return contents;
}
} I still think the pragmas could be dropped and the documentation updated, I'm willing to help. Seems like it's been agreed that's the best way to do plugins according to @jrburke here requirejs/r.js#116 |
Happy to take a PR for it. On Thu, Oct 22, 2015 at 3:13 PM Caleb Hearon [email protected]
|
See what you think of my branch for this issue: https://github.com/chearon/require-handlebars-plugin/tree/issue-244 I didn't have to change |
Yea. Might need a couple more words in the readme (or a link) on how to get the optimized output, but the code looks great. PR me? |
cool! Just added some stuff to the readme and opened a PR |
I followed the
example.build.js
found in the demo directory, but setting all of the pragmas still leaves me with the full Handlebars compiler built into my source.Grepping 1.0.0 for
excludeHbsParser
gives no results other than the build config, so I don't think it's actually being used anywhere.That's the (I think) objective thing I found, now if I may make a couple suggestions:
stubModules
for the optimized plugin? To do that you'd need to (a) not requirehbs
in compiled templates and (b) get it to loadhandlebars.runtime.js
which the compiled templates need, maybe by having users adjust theirpaths.config
The text was updated successfully, but these errors were encountered: