-
Notifications
You must be signed in to change notification settings - Fork 0
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
Export bh instance as template result #1
Comments
I suspect that the second variant is slightly better, cause it's easier to understand and to use. Also it restricts undocumented ways of usage. But still, we have to provide the full API if the user will require |
btw, I just thought, we can wrap What do you think, if we implement var bh = new require('bh').BH;
module.exports = function (bemjson) {
return bh.apply(bemjson);
}
module.exports.add = function (name, template) {
bh.match(name, template);
}; |
The last example is not ok because method Also, I don't think that we have a custom API. We are just instantiating BH. ENB does exactly the same thing here: https://github.com/enb-bem/enb-bh/blob/master/techs/bh-commonjs.js#L129 |
Well, I wanted to make it slightly better. Also I wanted to have the same API from the template and |
Consider two options.
the second option is nice because it exposes function as well it does
handlebars
and jadeloaders
The text was updated successfully, but these errors were encountered: