cms/app-client/config/environment.js
author ymh <ymh.work@gmail.com>
Tue, 20 Mar 2018 15:02:40 +0100
changeset 573 25f3d28f51b2
parent 543 aaaf9b0b09f6
permissions -rw-r--r--
Added tag 0.0.25 for changeset 190ae1dee68d

/* eslint-env node */

module.exports = function(environment) {
    let ENV = {
        rootElement: '#corpus-app',
        modulePrefix: 'app-client',
        environment: environment,
        rootURL: '/corpus/',
        locationType: 'hash',
        EmberENV: {
            FEATURES: {
                // Here you can enable experimental features on an ember canary build
                // e.g. 'with-controller': true
            },
      EXTEND_PROTOTYPES: {
        // Prevent Ember Data from overriding Date.parse.
        Date: false
      }
        },
        APP: {
            backRootURL: '/corpus/',
            navigationLinksSelector: '.sub-menu > a',
            // Here you can pass flags/options to your application instance
            // when it is created
        }
    };
    if (environment === 'development') {
        ENV.contentSecurityPolicy = {
            'default-src': "'none'",
            'script-src': "'self' *",
            'font-src': "'self'",
            'connect-src': "'self' *",
            'img-src': "'self'",
            'style-src': "'self' *",
            'media-src': "'self'"
        };
    }
    if (environment === 'test') {
        ENV.rootURL = '/';
        ENV.locationType = 'none';
        ENV.APP.LOG_ACTIVE_GENERATION = false;
        ENV.APP.LOG_VIEW_LOOKUPS = false;
        ENV.APP.rootElement = '#ember-testing';
        ENV.APP.backRootURL = '/';
    }

    if (environment === 'production') {
        ENV.rootURL = '/corpus-app/';
        ENV.APP.backRootURL = '/corpus-back/';
    }

  return ENV;
};