Is there any (tricky, dorky, or otherwise frowned upon) way of placing many definitions in a single helper file...
For example, I have the following helpers that dont seem to warrant a file per each.
Ember.Handlebars.helper('format-markdown', function(input) {
return new Handlebars.SafeString(showdown.makeHtml(input));
});
Ember.Handlebars.helper('format-fromnow', function(date) {
return moment(date).fromNow();
});
Ember.Handlebars.helper('format-long', function(date) {
return moment(date).format('MMMM Do YYYY, h:mm:ss a');
});
Ember.Handlebars.helper('format-currency', function(mynumber) {
return numeral(mynumber).format('$0,0.00');
});
im porting from a ember proj where everything is lumped into a few files. which is grossly too few.
Aucun commentaire:
Enregistrer un commentaire