Closed wbyoung closed 5 years ago
I really dig this approach, but I think the method should be called variant
since it is creating a variant of the compiler.
Variant works for me… updated:
Simple
Emblem.compile(contents, options);
Emblem.precompile(contents, options);
Emblem + Ember
var EmberHandlebars = require('ember-template-compiler').EmberHandlebars;
Emblem.variant(EmberHandlebars).compile(contents, options);
It'd be nice if somehow we could get an object from Emblem.js that compiled input with the same arguments that
Handlebars.precompile
does.This would really just be a convenience wrapper around methods that Emblem already exposes, but could make things more clear when used in certain circumstances. A discussion has popped up related to gulp.js on fuseelements/gulp-ember-handlebars#12. We're trying to reduce four different gulp.js plugins to one without making it too hard on the user.
I'd like to propose something like this:
Simple
Emblem + Ember
This will allow a gulp.js workflow which would be a bit easier (on the brain) than currying Emblem.precompile: