forked from btecu/ember-cli-bootstrap-datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (28 loc) · 1.05 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
/* jshint node: true */
'use strict';
const Funnel = require('broccoli-funnel');
const path = require('path');
const mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'ember-cli-bootstrap-datetimepicker',
included: function(app) {
this._super.included(app);
// Import unminified css and js
let basePath = `${this.treePaths.vendor}/eonasdan-bootstrap-datetimepicker`;
app.import(`${basePath}/build/css/bootstrap-datetimepicker.css`);
app.import(`${basePath}/src/js/bootstrap-datetimepicker.js`);
},
treeForVendor: function(vendorTree) {
let trees = [];
if (vendorTree) {
trees.push(vendorTree);
}
let datetimepickerJs = require.resolve('eonasdan-bootstrap-datetimepicker-npm');
let datetimepickerPath = path.join(path.dirname(datetimepickerJs), '../../');
trees.push(new Funnel(datetimepickerPath, {
destDir: 'eonasdan-bootstrap-datetimepicker',
include: ['build/css/bootstrap-datetimepicker.css', 'src/js/bootstrap-datetimepicker.js']
}));
return mergeTrees(trees);
}
};