forked from adopted-ember-addons/ember-inputmask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (31 loc) · 825 Bytes
/
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
/* eslint-env node */
'use strict';
const fastbootTransform = require('fastboot-transform');
const filesToImport = [
'dependencyLibs/inputmask.dependencyLib.js',
'inputmask.js',
'inputmask.extensions.js',
'inputmask.date.extensions.js',
'inputmask.numeric.extensions.js',
'inputmask.phone.extensions.js'
];
module.exports = {
name: 'ember-inputmask',
options: {
nodeAssets: {
inputmask: () => ({
vendor: {
include: filesToImport.map(file => `dist/inputmask/${file}`),
processTree: input => fastbootTransform(input)
}
})
}
},
included() {
this._super.included.apply(this, arguments);
filesToImport.forEach(file => {
this.import(`vendor/inputmask/dist/inputmask/${file}`);
});
this.import('vendor/shims/inputmask.js');
}
};