-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
164 lines (148 loc) · 4.26 KB
/
index.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
'use strict';
const { name } = require('./package');
module.exports = {
name,
options: {
'babel': {
plugins: [
'ember-auto-import/babel-plugin',
'@babel/plugin-syntax-top-level-await',
'@babel/plugin-transform-block-scoping',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-optional-catch-binding',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-logical-assignment-operators',
['@babel/plugin-proposal-pipeline-operator', { 'proposal': 'minimal' }]
]
},
'ember-cli-babel': {
compileModules: true,
includePolyfill: true,
disablePresetEnv: false,
disableDebugTooling: false,
// includeExternalHelpers: true,
throwUnlessParallelizable: false,
disableDecoratorTransforms: false,
disableEmberModulesAPIPolyfill: false,
disableEmberDataPackagesPolyfill: false
},
'ember-fetch': {
preferNative: true
},
'ember-paper': {
insertFontLinks: false
},
'ember-cli-mirage': {
enabled: false
},
'ember-cli-head': {
suppressBrowserRender: false
},
'ember-cli-notifications': {
includeFontAwesome: false,
clearDuration: 3500,
autoClear: true
},
'ember-load-css': {
enabled: true,
minifyJS: {
enabled: true
}
},
moment: {
allowEmpty: true,
outputFormat: 'L',
includeLocales: ['en'],
includeTimezone: 'none'
// localeOutputPath: 'assets/moment-locales'
},
pace: {
// addon-specific options to configure theme
color: 'blue',
target: 'body',
theme: 'minimal',
// pace-specific options
// learn more on http://github.hubspot.com/pace/#configuration
minTime: 100,
ghostTime: 50,
catchupTime: 50,
easeFactor: 1.25,
initialRate: 0.01,
startOnPageLoad: true,
maxProgressPerFrame: 20,
restartOnPushState: true,
restartOnRequestAfter: 500,
elements: {
checkInterval: 100,
selectors: ['body', '.ember-view']
},
eventLag: {
minSamples: 10,
sampleCount: 3,
lagThreshold: 3
},
ajax: {
trackMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
trackWebSockets: false,
ignoreURLs: []
}
},
EmberHammertime: {
touchActionSelectors: ['button', 'input', 'a', 'textarea'],
touchActionProperties: 'touch-action: manipulation; -ms-touch-action: manipulation; cursor: pointer;'
},
emberOffline: {
themes: {
theme: 'chrome',
language: 'english'
},
// Should we check the connection status immediatly on page load.
checkOnLoad: true,
// Should we monitor AJAX requests to help decide if we have a connection.
interceptRequests: true,
// Should we store and attempt to remake requests which fail while the connection is down.
requests: true,
// Should deduping also take into account the content of the request.
deDupBody: true,
// Should we show a snake game while the connection is down to keep the user entertained?
// It's not included in the normal build, you should bring in js/snake.js in addition to
// offline.min.js.
game: false,
// What url should be used to test online status
// Defaults to /favicon.ico
checks: { xhr: { url: '/api/status' } },
// Should we automatically retest periodically when the connection is down
// set to false to disable
reconnect: {
// How many seconds should we wait before rechecking.
initialDelay: 10,
// How long should we wait between retries.
// Default (1.5 * last delay, capped at 1 hour)
delay: null
}
}
},
config() {
let options = Object.assign({}, this.options, this._getAddonOptions());
delete options.sassOptions;
delete options.project;
delete options.trees;
return options;
},
included() {
this._super.included.apply(this, arguments);
this.import('node_modules/normalize.css/normalize.css');
this.import('node_modules/animate.css/animate.css');
},
_getAddonOptions(opt) {
let host = this._findHost() || {};
let topLevelOptions = host.options;
let parentOptions = this.parent && this.parent.options;
if (!opt) { return topLevelOptions || parentOptions; }
return topLevelOptions && topLevelOptions[opt]
|| parentOptions && parentOptions[opt];
}
};