2016-11-14 16:16:51 +03:00
|
|
|
/* eslint-env node */
|
2017-03-28 13:29:18 +03:00
|
|
|
'use strict';
|
2015-02-19 03:11:42 +03:00
|
|
|
|
|
|
|
module.exports = function (environment) {
|
2017-03-28 13:29:18 +03:00
|
|
|
let ENV = {
|
2016-05-24 15:06:59 +03:00
|
|
|
modulePrefix: 'ghost-admin',
|
2017-03-28 13:29:18 +03:00
|
|
|
environment,
|
2016-07-31 22:47:19 +03:00
|
|
|
rootURL: '/',
|
2017-03-14 19:04:46 +03:00
|
|
|
locationType: 'trailing-hash',
|
2015-02-19 03:11:42 +03:00
|
|
|
EmberENV: {
|
|
|
|
FEATURES: {
|
|
|
|
// Here you can enable experimental features on an ember canary build
|
|
|
|
// e.g. 'with-controller': true
|
2016-07-31 22:47:19 +03:00
|
|
|
},
|
|
|
|
// @TODO verify that String/Function need to be enabled
|
|
|
|
EXTEND_PROTOTYPES: {
|
|
|
|
Date: false,
|
|
|
|
Array: true,
|
|
|
|
String: true,
|
|
|
|
Function: true
|
2015-02-19 03:11:42 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
APP: {
|
2016-06-03 13:51:06 +03:00
|
|
|
// Here you can pass flags/options to your application instance
|
|
|
|
// when it is created
|
|
|
|
|
|
|
|
// override the default version string which contains git info from
|
|
|
|
// https://github.com/cibernox/git-repo-version. Only include the
|
|
|
|
// `major.minor` version numbers
|
2016-06-03 16:47:47 +03:00
|
|
|
version: require('../package.json').version.match(/^(\d+\.)?(\d+)/)[0]
|
2015-05-13 08:27:59 +03:00
|
|
|
},
|
|
|
|
|
2017-04-05 20:45:35 +03:00
|
|
|
'ember-simple-auth': { },
|
2017-02-06 18:53:04 +03:00
|
|
|
|
2017-04-05 20:45:35 +03:00
|
|
|
moment: {
|
|
|
|
includeTimezone: 'all'
|
2017-09-04 22:17:04 +03:00
|
|
|
}
|
2015-02-19 03:11:42 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
if (environment === 'development') {
|
|
|
|
// ENV.APP.LOG_RESOLVER = true;
|
|
|
|
ENV.APP.LOG_ACTIVE_GENERATION = true;
|
|
|
|
ENV.APP.LOG_TRANSITIONS = true;
|
|
|
|
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
|
|
|
ENV.APP.LOG_VIEW_LOOKUPS = true;
|
2018-03-19 13:51:40 +03:00
|
|
|
|
2016-04-13 12:44:09 +03:00
|
|
|
// Enable mirage here in order to mock API endpoints during development
|
2015-10-13 16:52:41 +03:00
|
|
|
ENV['ember-cli-mirage'] = {
|
2019-03-06 19:49:53 +03:00
|
|
|
enabled: false
|
2015-10-13 16:52:41 +03:00
|
|
|
};
|
2015-02-13 07:22:32 +03:00
|
|
|
}
|
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
if (environment === 'test') {
|
|
|
|
// Testem prefers this...
|
|
|
|
ENV.locationType = 'none';
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
// keep test console output quieter
|
|
|
|
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
|
|
|
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
ENV.APP.rootElement = '#ember-testing';
|
2019-01-02 12:58:55 +03:00
|
|
|
ENV.APP.autoboot = false;
|
2018-03-19 12:53:17 +03:00
|
|
|
|
|
|
|
// Withuot manually setting this, pretender won't track requests
|
|
|
|
ENV['ember-cli-mirage'] = {
|
|
|
|
trackRequests: true
|
|
|
|
};
|
2015-02-19 03:11:42 +03:00
|
|
|
}
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
return ENV;
|
2015-02-13 07:22:32 +03:00
|
|
|
};
|