-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.js
56 lines (42 loc) · 1.51 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* eslint-env node */
'use strict';
const Funnel = require('broccoli-funnel');
const MergeTrees = require('broccoli-merge-trees');
const path = require('path');
module.exports = {
name: require('./package').name,
// https://github.com/IvyApp/ivy-videojs/blob/master/index.js
included(app) {
this._super.included.apply(this, arguments);
const baseDirectory = 'node_modules/video.js/dist';
app.import({
development: path.join(baseDirectory, 'video-js.css'),
production: path.join(baseDirectory, 'video-js.min.css')
});
// app.import(path.join(baseDirectory, 'font/VideoJS.eot'), { destDir: 'assets/font' });
// app.import(path.join(baseDirectory, 'font/VideoJS.svg'), { destDir: 'assets/font' });
// app.import(path.join(baseDirectory, 'font/VideoJS.ttf'), { destDir: 'assets/font' });
// app.import(path.join(baseDirectory, 'font/VideoJS.woff'), { destDir: 'assets/font' });
app.import({
development: path.join(baseDirectory, 'video.js'),
production: path.join(baseDirectory, 'video.min.js'),
});
app.import('vendor/shims/videojs.js');
},
treeForVendor: function(vendorTree){
var videojsPath = path.dirname(require.resolve('video.js'));
var trees = [];
if(vendorTree){
trees.push(vendorTree);
}
var videojsTree = new Funnel(videojsPath, {
srcDir: '/',
destDir: 'videojs',
});
trees.push(videojsTree);
return new MergeTrees(trees, { overwrite: true });
},
isDevelopingAddon() {
return false;
}
};