Ghost/core/client/app.js
Jacob Gable f795a907f0 Add ghostPaths util and initializer
No Issue

- Move the ghostPaths from base model to utils
- Add initializer that injects it into every route, model and controller
- Add a adminUrl and apiUrl helper method
2014-05-24 08:52:47 +02:00

34 lines
1.1 KiB
JavaScript
Executable File

import Resolver from 'ember/resolver';
import initFixtures from 'ghost/fixtures/init';
import injectCurrentUser from 'ghost/initializers/current-user';
import injectCsrf from 'ghost/initializers/csrf';
import {registerNotifications, injectNotifications} from 'ghost/initializers/notifications';
import registerTrailingLocationHistory from 'ghost/initializers/trailing-history';
import injectGhostPaths from 'ghost/initializers/ghost-paths';
import 'ghost/utils/link-view';
import 'ghost/utils/text-field';
var App = Ember.Application.extend({
/**
* These are debugging flags, they are useful during development
*/
LOG_ACTIVE_GENERATION: true,
LOG_MODULE_RESOLVER: true,
LOG_TRANSITIONS: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_VIEW_LOOKUPS: true,
modulePrefix: 'ghost',
Resolver: Resolver['default']
});
initFixtures();
App.initializer(injectCurrentUser);
App.initializer(injectCsrf);
App.initializer(injectGhostPaths);
App.initializer(registerNotifications);
App.initializer(injectNotifications);
App.initializer(registerTrailingLocationHistory);
export default App;