-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrocfile.js
36 lines (32 loc) · 810 Bytes
/
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
var esTranspiler = require('broccoli-babel-transpiler');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var browserify = require('broccoli-browserify');
var serverTree = pickFiles("src", {
srcDir: "",
files: [
'app/**/*.js',
'server.js'
],
destDir: '/'
});
serverTree = esTranspiler(serverTree);
var clientTree = pickFiles("src", {
srcDir: "",
files: [
"app/**/*.js",
"client.js"
],
destDir: '/public'
});
clientTree = esTranspiler(clientTree);
clientTree = browserify(clientTree, {
entries: ["./public/client.js"],
outputFile: "./public/app.js"
});
var assetsTree = pickFiles("src/assets", {
srcDir: "",
files: ["*"],
destDir: "public"
});
module.exports = mergeTrees([serverTree, clientTree, assetsTree]);