-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.js
40 lines (31 loc) · 815 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
35
36
37
38
39
40
'use strict';
const path = require('path');
const resolve = require('resolve');
const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: require('./package').name,
included(app) {
this._super.included(app);
app.import('vendor/ember-pell/pell.min.css');
app.import('vendor/ember-pell/pell.min.js', {
using: [
{ transformation: 'amd', as: 'pell' }
]
});
},
pellPath() {
return path.dirname(resolve.sync('pell', { basedir: __dirname }))
},
treeForVendor(tree) {
let trees = [];
if (tree) {
trees.push(tree);
}
trees.push(new Funnel(this.pellPath(), {
destDir: 'ember-pell',
files: ['pell.min.js', 'pell.min.css']
}));
return mergeTrees(trees);
},
};