2014-11-27 23:50:15 +03:00
|
|
|
import getConfig from 'ghost/utils/config-parser';
|
|
|
|
|
2014-06-23 20:01:43 +04:00
|
|
|
var ConfigInitializer = {
|
|
|
|
name: 'config',
|
|
|
|
|
|
|
|
initialize: function (container, application) {
|
2014-11-27 23:50:15 +03:00
|
|
|
var config = getConfig();
|
|
|
|
application.register('ghost:config', config, {instantiate: false});
|
2014-06-23 20:01:43 +04:00
|
|
|
|
|
|
|
application.inject('route', 'config', 'ghost:config');
|
|
|
|
application.inject('controller', 'config', 'ghost:config');
|
2014-06-24 01:12:22 +04:00
|
|
|
application.inject('component', 'config', 'ghost:config');
|
2014-06-23 20:01:43 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ConfigInitializer;
|