-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrocfile.js
45 lines (37 loc) · 1.1 KB
/
Brocfile.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
var mergeTrees = require('broccoli-merge-trees');
var compileSass = require('broccoli-sass');
var Funnel = require('broccoli-funnel');
var findBowerTrees = require('broccoli-bower');
var sixToFive = require('broccoli-6to5-transpiler');
var es6Modules = require('broccoli-es6modules');
var cssTree = compileSass(
['styles'],
'/app.scss',
'/assets/app.css'
);
var jsTree = new Funnel('app', {
srcDir: '/',
destDir: '/assets',
include: [
'**/*.jsx',
'**/*.js'
]
});
jsTree = sixToFive(jsTree, {
blacklist: ['es6.modules', 'useStrict']
});
jsTree = new es6Modules(jsTree, {
description: 'ES6: App Js',
esperantoOptions: {
absolutePaths: true,
strict: true
}
});
var sourceTrees = [jsTree, cssTree, 'public'];
// Add bower dependencies
// findBowerTrees uses heuristics to pick the lib directory and/or main files,
// and returns an array of trees for each bower package found.
sourceTrees = sourceTrees.concat(findBowerTrees());
// merge array into tree
var appAndDependencies = new mergeTrees(sourceTrees, { overwrite: true });
module.exports = mergeTrees([appAndDependencies]);