Skip to content

Commit 108caa0

Browse files
committed
Move broccoli staff to Brocfile
1 parent 0b5c92e commit 108caa0

File tree

2 files changed

+17
-36
lines changed

2 files changed

+17
-36
lines changed

Brocfile.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* jshint node: true */
22
/* global require, module */
33

4+
var mergeTrees = require( 'broccoli-merge-trees' ),
5+
pickFiles = require( 'broccoli-static-compiler' );
46
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
57

68
var app = new EmberAddon();
@@ -18,4 +20,17 @@ var app = new EmberAddon();
1820
// please specify an object with the list of modules as keys
1921
// along with the exports of each module as its value.
2022

21-
module.exports = app.toTree();
23+
app.import( 'bower_components/bootstrap/dist/css/bootstrap-theme.css.map' );
24+
app.import('bower_components/bootstrap/dist/css/bootstrap.css');
25+
app.import('bower_components/fontawesome/css/font-awesome.min.css');
26+
app.import('bower_components/highlightjs/highlight.pack.js');
27+
app.import('bower_components/highlightjs/styles/tomorrow.css');
28+
29+
var extraAssets = pickFiles( 'bower_components/fontawesome/fonts', {
30+
srcDir : '/',
31+
files : [ 'fontawesome-webfont.woff' ],
32+
destDir : '/fonts'
33+
});
34+
35+
module.exports = mergeTrees([app.toTree(), extraAssets]);
36+
// module.exports = app.toTree();

index.js

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,6 @@
11
/* jshint node: true */
22
'use strict';
3-
var mergeTrees = require( 'broccoli-merge-trees' ),
4-
pickFiles = require( 'broccoli-static-compiler' );
53

64
module.exports = {
7-
name: 'ember-idx-tree',
8-
9-
included: function( app ) {
10-
this._super.included( app );
11-
var isDummy = app.name === 'dummy'
12-
13-
if (isDummy) {
14-
app.import( 'bower_components/bootstrap/dist/css/bootstrap-theme.css.map' );
15-
16-
app.import({
17-
development : 'bower_components/bootstrap/dist/css/bootstrap.css'
18-
});
19-
app.import({
20-
development : 'bower_components/fontawesome/css/font-awesome.min.css'
21-
});
22-
app.import({
23-
development : 'bower_components/highlightjs/highlight.pack.js'
24-
});
25-
app.import({
26-
development : 'bower_components/highlightjs/styles/tomorrow.css'
27-
});
28-
}
29-
},
30-
31-
postprocessTree: function( type, tree ) {
32-
return mergeTrees([ tree,
33-
pickFiles( 'bower_components/fontawesome/fonts', {
34-
srcDir : '/',
35-
files : [ 'fontawesome-webfont.woff' ],
36-
destDir : '/fonts'
37-
})
38-
]);
39-
},
5+
name: 'ember-idx-tree'
406
};

0 commit comments

Comments
 (0)