forked from IvyApp/ivy-videojs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
58 lines (42 loc) · 1.82 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
57
58
/* jshint node: true */
'use strict';
var path = require('path');
module.exports = {
name: 'ivy-videojs',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
included: function(app) {
this._super.included.call(this, app)
if (!process.env.EMBER_CLI_FASTBOOT) {
var options = app.options.videojs || {};
var env = app.env;
console.log('running savo version of ivy-videojs');
console.log('bowerDirectory: ', app.bowerDirectory);
app.bowerDirectory = app.bowerDirectory || 'bower_components';
if(app.env === 'production') {
app.import(path.join(app.bowerDirectory, 'video.js/dist/video-js.min.css'));
} else {
app.import(path.join(app.bowerDirectory, 'video.js/dist/video-js.css'));
}
app.import(path.join(app.bowerDirectory, 'video.js/dist/font/VideoJS.eot'), { destDir: 'assets/font' });
app.import(path.join(app.bowerDirectory, 'video.js/dist/font/VideoJS.svg'), { destDir: 'assets/font' });
app.import(path.join(app.bowerDirectory, 'video.js/dist/font/VideoJS.ttf'), { destDir: 'assets/font' });
app.import(path.join(app.bowerDirectory, 'video.js/dist/font/VideoJS.woff'), { destDir: 'assets/font' });
app.import('vendor/ivy-videojs/shims.js', {
exports: {
videojs: ['default']
}
});
if(app.env === 'production') {
app.import(path.join(app.bowerDirectory, 'video.js/dist/video.min.js'));
} else {
app.import(path.join(app.bowerDirectory, 'video.js/dist/video.js'));
}
(options.languages || []).forEach(function(language) {
app.import(path.join(app.bowerDirectory, 'video.js/dist/lang/' + language + '.js'));
});
app.import(path.join(app.bowerDirectory, 'video.js/dist/video-js.swf'), { destDir: 'assets' });
}
}
};