2014-12-20 14:26:46 +08:00
|
|
|
/* jshint node: true */
|
|
|
|
|
|
|
|
module.exports = function(environment) {
|
|
|
|
var ENV = {
|
2014-12-23 10:15:07 +08:00
|
|
|
modulePrefix: 'flarum',
|
2014-12-20 14:26:46 +08:00
|
|
|
environment: environment,
|
|
|
|
baseURL: '/',
|
2015-01-23 10:18:21 +08:00
|
|
|
apiURL: '/api',
|
2014-12-23 10:15:07 +08:00
|
|
|
locationType: 'hash',
|
2014-12-20 14:26:46 +08:00
|
|
|
EmberENV: {
|
|
|
|
FEATURES: {
|
|
|
|
// Here you can enable experimental features on an ember canary build
|
|
|
|
// e.g. 'with-controller': true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
APP: {
|
|
|
|
// Here you can pass flags/options to your application instance
|
|
|
|
// when it is created
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (environment === 'development') {
|
|
|
|
// ENV.APP.LOG_RESOLVER = true;
|
2015-01-21 11:58:28 +08:00
|
|
|
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
2014-12-20 14:26:46 +08:00
|
|
|
// ENV.APP.LOG_TRANSITIONS = true;
|
|
|
|
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
2015-01-21 11:58:28 +08:00
|
|
|
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
2014-12-20 14:26:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (environment === 'test') {
|
2014-12-23 10:15:07 +08:00
|
|
|
// Testem prefers this...
|
|
|
|
ENV.baseURL = '/';
|
|
|
|
ENV.locationType = 'none';
|
2015-01-23 10:18:21 +08:00
|
|
|
ENV.apiURL = 'http://flarum.dev/api',
|
2014-12-20 14:26:46 +08:00
|
|
|
|
2014-12-23 10:15:07 +08:00
|
|
|
// keep test console output quieter
|
|
|
|
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
|
|
|
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
|
|
|
|
|
|
|
ENV.APP.rootElement = '#ember-testing';
|
2014-12-20 14:26:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (environment === 'production') {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ENV;
|
|
|
|
};
|