author | ymh <ymh.work@gmail.com> |
Fri, 17 Feb 2017 22:01:32 +0100 | |
changeset 517 | 3143195e91b4 |
parent 456 | 3a32d2f57429 |
child 537 | d2e6ee099125 |
permissions | -rw-r--r-- |
4 | 1 |
/* jshint node: true */ |
2 |
||
3 |
module.exports = function(environment) { |
|
517 | 4 |
const rootURL = '/'; |
5 |
const ENV = { |
|
4 | 6 |
modulePrefix: 'bo-client', |
28 | 7 |
podModulePrefix: 'bo-client/pods', |
4 | 8 |
environment: environment, |
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
9 |
rootURL: rootURL, |
4 | 10 |
locationType: 'auto', |
517 | 11 |
i18n: { |
28 | 12 |
defaultLocale: 'fr' |
13 |
}, |
|
4 | 14 |
EmberENV: { |
15 |
FEATURES: { |
|
16 |
// Here you can enable experimental features on an ember canary build |
|
17 |
// e.g. 'with-controller': true |
|
456 | 18 |
}, |
19 |
EXTEND_PROTOTYPES: { |
|
20 |
// Prevent Ember Data from overriding Date.parse. |
|
21 |
Date: false |
|
4 | 22 |
} |
23 |
}, |
|
24 |
||
25 |
APP: { |
|
26 |
// Here you can pass flags/options to your application instance |
|
27 |
// when it is created |
|
517 | 28 |
'bo-doc-viaf-autocomplete': { |
29 |
viafQueryUrl: 'http://viaf.org/viaf/AutoSuggest?query=', |
|
30 |
viafBaseUrl: 'http://viaf.org/viaf/', |
|
135 | 31 |
}, |
517 | 32 |
'bo-doc-bnf-autocomplete': { |
33 |
bnfQueryUrl: rootURL + 'proxy/bnf/?term=', |
|
34 |
bnfBaseUrl: 'http://data.bnf.fr/', |
|
35 |
bnfSparqlUrl: rootURL + 'proxy/bnf-sparql' |
|
36 |
}, |
|
37 |
backRootURL: '/' |
|
456 | 38 |
} |
4 | 39 |
}; |
40 |
||
41 |
if (environment === 'development') { |
|
456 | 42 |
// ENV.APP.LOG_RESOLVER = true; |
43 |
// ENV.APP.LOG_ACTIVE_GENERATION = true; |
|
44 |
// ENV.APP.LOG_TRANSITIONS = true; |
|
45 |
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; |
|
46 |
// ENV.APP.LOG_VIEW_LOOKUPS = true; |
|
4 | 47 |
} |
48 |
||
49 |
if (environment === 'test') { |
|
50 |
// Testem prefers this... |
|
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
51 |
ENV.rootURL = '/'; |
4 | 52 |
ENV.locationType = 'none'; |
53 |
||
54 |
// keep test console output quieter |
|
55 |
ENV.APP.LOG_ACTIVE_GENERATION = false; |
|
56 |
ENV.APP.LOG_VIEW_LOOKUPS = false; |
|
57 |
||
58 |
ENV.APP.rootElement = '#ember-testing'; |
|
59 |
} |
|
60 |
||
61 |
if (environment === 'production') { |
|
20 | 62 |
ENV.locationType = 'hash'; |
4 | 63 |
} |
64 |
||
65 |
return ENV; |
|
66 |
}; |