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 grossly too few files.
ach. i found an example of it in the docs. however its not clear where the import goes.
1 // helpers/custom-helpers.js
2 var customHelpers = function() {
3 Ember.Test.registerHelper('myGreatHelper', function (app) {
4 //do awesome test stuff
5 });
6
7 Ember.Test.registerAsyncHelper('myGreatAsyncHelper', function (app) {
8 //do awesome test stuff
9 });
10 }();
11
12 export default customHelpers;
is startApp a special entrypoint. This does not appear to work. 1 // helpers/start-app.js 2 import customHelpers from './custom-helpers'; 3 4 export default function startApp(attrs) { 5 //...