author | ymh <ymh.work@gmail.com> |
Fri, 02 Dec 2016 09:33:53 +0100 | |
changeset 456 | 3a32d2f57429 |
parent 263 | 3deace9204de |
child 517 | 3143195e91b4 |
permissions | -rw-r--r-- |
4 | 1 |
/* jshint node: true */ |
2 |
||
3 |
module.exports = function(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
|
4 |
var rootURL = '/'; |
4 | 5 |
var ENV = { |
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', |
28 | 11 |
i18n : { |
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 |
|
28 | 28 |
'bo-doc-viaf-autocomplete' : { |
29 |
viafQueryUrl: "http://viaf.org/viaf/AutoSuggest?query=", |
|
30 |
viafBaseUrl: "http://viaf.org/viaf/", |
|
135 | 31 |
}, |
32 |
'bo-doc-bnf-autocomplete' : { |
|
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
|
33 |
bnfQueryUrl: rootURL + "proxy/bnf/?term=", |
135 | 34 |
bnfBaseUrl: "http://data.bnf.fr/", |
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
|
35 |
bnfSparqlUrl: rootURL + "proxy/bnf-sparql" |
28 | 36 |
} |
456 | 37 |
} |
4 | 38 |
}; |
39 |
||
40 |
if (environment === 'development') { |
|
456 | 41 |
// ENV.APP.LOG_RESOLVER = true; |
42 |
// ENV.APP.LOG_ACTIVE_GENERATION = true; |
|
43 |
// ENV.APP.LOG_TRANSITIONS = true; |
|
44 |
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; |
|
45 |
// ENV.APP.LOG_VIEW_LOOKUPS = true; |
|
4 | 46 |
} |
47 |
||
48 |
if (environment === 'test') { |
|
49 |
// 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
|
50 |
ENV.rootURL = '/'; |
4 | 51 |
ENV.locationType = 'none'; |
52 |
||
53 |
// keep test console output quieter |
|
54 |
ENV.APP.LOG_ACTIVE_GENERATION = false; |
|
55 |
ENV.APP.LOG_VIEW_LOOKUPS = false; |
|
56 |
||
57 |
ENV.APP.rootElement = '#ember-testing'; |
|
58 |
} |
|
59 |
||
60 |
if (environment === 'production') { |
|
20 | 61 |
ENV.locationType = 'hash'; |
4 | 62 |
} |
63 |
||
64 |
return ENV; |
|
65 |
}; |