-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
ember-config.js
101 lines (101 loc) · 3.3 KB
/
ember-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* This config describes canonical Ember, as described in the
* module unification spec:
*
* https://github.com/dgeb/rfcs/blob/module-unification/text/0000-module-unification.md
*
*/
export default function generateConfig(name) {
return {
app: {
name,
rootName: name
},
types: {
adapter: { definitiveCollection: 'models' },
application: { definitiveCollection: 'main' },
controller: { definitiveCollection: 'routes' },
component: { definitiveCollection: 'components' },
'component-lookup': { definitiveCollection: 'main' },
event_dispatcher: { definitiveCollection: 'main' },
helper: { definitiveCollection: 'components' },
initializer: { definitiveCollection: 'initializers' },
'instance-initializers': { definitiveCollection: 'instance-initializer' },
location: { definitiveCollection: 'main' },
model: { definitiveCollection: 'models' },
partial: { definitiveCollection: 'partials' },
renderer: { definitiveCollection: 'main' },
route: { definitiveCollection: 'routes' },
router: { definitiveCollection: 'main' },
serializer: { definitiveCollection: 'models' },
service: { definitiveCollection: 'services' },
template: { definitiveCollection: 'components' },
'template-options': { definitiveCollection: 'main' },
transform: { definitiveCollection: 'transforms' },
view: { definitiveCollection: 'views' },
'-view-registry': { definitiveCollection: 'main' },
'-bucket-cache': { definitiveCollection: 'main' },
'-environment': { definitiveCollection: 'main' },
'-application-instance': { definitiveCollection: 'main' }
},
collections: {
'main': {
types: ['router', '-bucket-cache', 'component-lookup', '-view-registry', 'event_dispatcher', 'application', 'location', 'renderer', '-environment', '-application-instance']
},
components: {
group: 'ui',
privateCollections: ['utils'],
types: ['component', 'helper', 'template']
},
initializers: {
group: 'init',
defaultType: 'initializer',
privateCollections: ['utils'],
types: ['initializer']
},
'instance-initializers': {
group: 'init',
defaultType: 'instance-initializer',
privateCollections: ['utils'],
types: ['instance-initializers']
},
models: {
group: 'data',
defaultType: 'model',
privateCollections: ['utils'],
types: ['model', 'adapter', 'serializer']
},
partials: {
group: 'ui',
defaultType: 'partial',
privateCollections: ['utils'],
types: ['partial']
},
routes: {
group: 'ui',
defaultType: 'route',
privateCollections: ['components', 'utils'],
types: ['route', 'controller', 'template']
},
services: {
defaultType: 'service',
privateCollections: ['utils'],
types: ['service']
},
utils: {
unresolvable: true
},
views: {
defaultType: 'view',
privateCollections: ['utils'],
types: ['view']
},
transforms: {
group: 'data',
defaultType: 'transform',
privateCollections: ['utils'],
types: ['transform']
}
}
};
}