mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
59b9f161dd
- the helper dir also contained some code used with helpers - utils and helper-helpers? - the goal here was for helpers to be the only thing in their folder so we can look at moving them out - all other code has been moved to services/themes for now, which is not the right place either - services/themes is a catch-all for theme storage, loading, validation, rendering and more, needs to be broken down
19 lines
661 B
JavaScript
19 lines
661 B
JavaScript
const helpers = require('../../services/themes/handlebars/register');
|
|
const routingService = require('../../services/routing');
|
|
|
|
module.exports.getInstance = function getInstance() {
|
|
const appRouter = routingService.registry.getRouter('appRouter');
|
|
|
|
return {
|
|
helpers: {
|
|
register: helpers.registerThemeHelper.bind(helpers),
|
|
registerAsync: helpers.registerAsyncThemeHelper.bind(helpers)
|
|
},
|
|
// Expose the route service...
|
|
routeService: {
|
|
// This allows for mounting an entirely new Router at a path...
|
|
registerRouter: appRouter.mountRouter.bind(appRouter)
|
|
}
|
|
};
|
|
};
|