github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/config/environment.js (about) 1 /* eslint-env node */ 2 3 const USE_MIRAGE = true; 4 5 module.exports = function(environment) { 6 var ENV = { 7 modulePrefix: 'nomad-ui', 8 environment: environment, 9 rootURL: '/ui/', 10 locationType: 'auto', 11 EmberENV: { 12 FEATURES: { 13 // Here you can enable experimental features on an ember canary build 14 // e.g. 'with-controller': true 15 'ember-routing-router-service': true, 16 }, 17 EXTEND_PROTOTYPES: { 18 // Prevent Ember Data from overriding Date.parse. 19 Date: false, 20 }, 21 }, 22 23 APP: { 24 blockingQueries: true, 25 mirageScenario: 'smallCluster', 26 mirageWithNamespaces: false, 27 mirageWithTokens: true, 28 mirageWithRegions: true, 29 }, 30 }; 31 32 if (environment === 'development') { 33 // ENV.APP.LOG_RESOLVER = true; 34 // ENV.APP.LOG_ACTIVE_GENERATION = true; 35 // ENV.APP.LOG_TRANSITIONS = true; 36 // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 37 // ENV.APP.LOG_VIEW_LOOKUPS = true; 38 39 ENV['ember-cli-mirage'] = { 40 enabled: USE_MIRAGE, 41 excludeFilesFromBuild: !USE_MIRAGE, 42 }; 43 } 44 45 if (environment === 'test') { 46 // Testem prefers this... 47 ENV.locationType = 'none'; 48 49 // keep test console output quieter 50 ENV.APP.LOG_ACTIVE_GENERATION = false; 51 ENV.APP.LOG_VIEW_LOOKUPS = false; 52 53 ENV.APP.rootElement = '#ember-testing'; 54 ENV.APP.autoboot = false; 55 56 ENV.browserify = { 57 tests: true, 58 }; 59 60 ENV['ember-cli-mirage'] = { 61 trackRequests: true, 62 }; 63 } 64 65 // if (environment === 'production') { 66 // } 67 68 return ENV; 69 };