-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.js
55 lines (44 loc) · 1.55 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
'use strict';
const fs = require('fs');
const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');
const path = require('path');
module.exports = {
name: 'fixtable-ember',
included() {
this._super.included.apply(this, arguments);
let fa = path.dirname(require.resolve('font-awesome/fonts/FontAwesome.otf'));
let fontAwesomeToImport = fs.readdirSync(fa);
fontAwesomeToImport.forEach((fontFileName) => {
this.import(path.join('vendor', 'fonts', fontFileName));
});
this.import(require.resolve('fixtable/dist/fixtable.js'));
this.import('vendor/styles/fixtable-ember.css');
this.import('vendor/styles/font-awesome.css');
this.import('vendor/styles/fixtable.css');
},
treeForVendor(tree) {
let treesToMerge = [];
if (tree) {
treesToMerge.push(tree);
}
let fontAwesomeFunnel = new Funnel(path.dirname(require.resolve('font-awesome/fonts/FontAwesome.otf')), {
destDir: 'fonts'
});
treesToMerge.push(fontAwesomeFunnel);
let fontAwesomeCssFunnel = new Funnel(path.dirname(require.resolve('font-awesome/css/font-awesome.css')), {
files:['font-awesome.css'],
destDir: 'styles'
});
treesToMerge.push(fontAwesomeCssFunnel);
let fixtableCssFunnel = new Funnel(path.dirname(require.resolve('fixtable/dist/fixtable.js')), {
files: ['fixtable.css'],
destDir: 'styles'
});
treesToMerge.push(fixtableCssFunnel);
return mergeTrees(treesToMerge, { overwrite: true });
},
isDevelopingAddon() {
return false;
}
};