-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.js
33 lines (28 loc) · 1.12 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
/* jshint node: true */
'use strict';
const path = require('path');
const resolve = require('resolve');
const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');
const fastbootTransform = require('fastboot-transform');
module.exports = {
name: 'ember-slack-search-input',
included(app) {
this._super.included.apply(this, arguments);
app.import('vendor/moment/moment.js');
app.import('vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css');
app.import('vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js');
},
treeForVendor(tree) {
let moment = fastbootTransform(new Funnel(this.pathBase('moment'), {
destDir: 'moment'
}));
let datepicker = fastbootTransform(new Funnel(this.pathBase('eonasdan-bootstrap-datetimepicker'), {
destDir: 'eonasdan-bootstrap-datetimepicker'
}));
return mergeTrees(tree ? [tree, moment, datepicker] : [moment, datepicker]);
},
pathBase(packageName) {
return path.dirname(resolve.sync(packageName + '/package.json', { basedir: __dirname }));
},
};