-
Notifications
You must be signed in to change notification settings - Fork 29
/
index.js
35 lines (28 loc) · 848 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
'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-introjs/intro.min.js', {
using: [
{ transformation: 'amd', as: 'intro-js' }
]
});
app.import('vendor/ember-introjs/introjs.min.css');
},
introJsPath() {
return path.dirname(resolve.sync('intro.js', { basedir: __dirname }))
},
treeForVendor(tree) {
const introJsTree = new Funnel(this.introJsPath(), {
srcDir: 'minified',
destDir: 'ember-introjs',
files: ['intro.min.js', 'introjs.min.css']
});
return tree ? new mergeTrees([tree, introJsTree]) : introJsTree;
}
}