cms/app-client/config/environment.js
author ymh <ymh.work@gmail.com>
Sat, 06 Aug 2016 21:29:33 +0700
changeset 261 02e2396bcbbc
parent 90 f0609941aa98
child 278 f2c2c80a49f7
permissions -rw-r--r--
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     1
/* jshint node: true */
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     2
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     3
module.exports = function(environment) {
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     4
  var ENV = {
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     5
    rootElement: '#corpus-app',
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     6
    modulePrefix: 'app-client',
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
     7
    environment: environment,
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
     8
    rootURL: '/corpus/',
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
     9
    locationType: 'hash',
49
66739650678f update main index to add the 2 kind of menu (hash and history) and set the locationType to hash
nowmad@nowmads-macbook-pro.local
parents: 8
diff changeset
    10
    // contentSecurityPolicy: {
66739650678f update main index to add the 2 kind of menu (hash and history) and set the locationType to hash
nowmad@nowmads-macbook-pro.local
parents: 8
diff changeset
    11
    //   'default-src': "'none'",
66739650678f update main index to add the 2 kind of menu (hash and history) and set the locationType to hash
nowmad@nowmads-macbook-pro.local
parents: 8
diff changeset
    12
    //   'style-src': "'self' 'http://localhost:4200'"
66739650678f update main index to add the 2 kind of menu (hash and history) and set the locationType to hash
nowmad@nowmads-macbook-pro.local
parents: 8
diff changeset
    13
    // },
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    14
    EmberENV: {
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    15
      FEATURES: {
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    16
        // Here you can enable experimental features on an ember canary build
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    17
        // e.g. 'with-controller': true
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    18
      }
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    19
    },
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    20
5
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    21
    APP: {
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    22
      baseStatic: '',
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    23
      // Here you can pass flags/options to your application instance
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    24
      // when it is created
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    25
    }
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    26
  };
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    27
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    28
  if (environment === 'development') {
8
f95603fd2e18 add baseStatic to APP env
nowmad@23.1.168.192.in-addr.arpa
parents: 5
diff changeset
    29
    ENV.APP.baseStatic = '';
5
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    30
    // ENV.APP.LOG_RESOLVER = true;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    31
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    32
    // ENV.APP.LOG_TRANSITIONS = true;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    33
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    34
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
90
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    35
    ENV.contentSecurityPolicy = {
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    36
      'default-src': "'none'",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    37
      'script-src': "'self' *",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    38
      'font-src': "'self'",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    39
      'connect-src': "'self' *",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    40
      'img-src': "'self'",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    41
      'style-src': "'self' *",
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    42
      'media-src': "'self'"
f0609941aa98 update libraries and go ember 2.2.0
nowmad@23.1.168.192.in-addr.arpa
parents: 84
diff changeset
    43
    };
5
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    44
  }
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    45
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    46
  if (environment === 'test') {
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    47
    // Testem prefers this...
261
02e2396bcbbc Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents: 90
diff changeset
    48
    ENV.rootURL = '/';
5
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    49
    ENV.locationType = 'none';
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    50
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    51
    // keep test console output quieter
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    52
    ENV.APP.LOG_ACTIVE_GENERATION = false;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    53
    ENV.APP.LOG_VIEW_LOOKUPS = false;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    54
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    55
    ENV.APP.rootElement = '#ember-testing';
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    56
  }
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    57
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    58
  if (environment === 'production') {
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    59
    ENV.APP.baseStatic = '/modules/corpus/app-client/';
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    60
  }
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    61
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    62
  return ENV;
d4b3da0dadc9 init ember app with 2 pages and an images
nowmad@23.1.168.192.in-addr.arpa
parents:
diff changeset
    63
};