forked from AnnotationSro/ember-mobile-inputs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
44 lines (34 loc) · 1.06 KB
/
index.js
File metadata and controls
44 lines (34 loc) · 1.06 KB
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
/* eslint-env node */
'use strict';
// const pathToRead = 'node_modules/flatpickr/dist/l10n';
module.exports = {
name: require('./package').name,
included: function(app) {
this._super.included.apply(this, arguments);
let appConfig = this.parent.config()['ember-mobile-inputs'];
let flatpickrLocale = 'uk';
if (appConfig && appConfig.date && appConfig.date.locale) {
flatpickrLocale = appConfig.date.locale;
}
// app.import('node_modules/inputmask/dist/jquery.inputmask.bundle.js');
const localePaths = `l10n/${flatpickrLocale}.js`;
const files = [
'flatpickr.js',
'flatpickr.css'
].concat(localePaths);
files.forEach((f) => {
app.import(`node_modules/flatpickr/dist/${f}`);
});
// app.import('node_modules/moment/moment.js');
// app.import('node_modules/dayjs/dayjs.min.js');
// app.import('node_modules/dayjs/locale/sk.js');
},
options: {
// autoImport:{
// exclude: ['dayjs'],
// webpack: {
// // extra webpack configuration goes here
// }
// }
}
};