-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathember-cli-build.js
80 lines (71 loc) · 1.78 KB
/
ember-cli-build.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* global require, module */
var EmberApp = require("ember-cli/lib/broccoli/ember-app");
var MergeTrees = require("broccoli-merge-trees");
var Concat = require("broccoli-concat");
var CopyIndex = require("./lib/copy-index");
var Funnel = require("broccoli-funnel");
var bowerTree = new Funnel("bower_components", {
include: [
"headjs/dist/1.0.0/head.js",
"benchmark/benchmark.js",
"rsvp/rsvp.js",
"ascii-table/ascii-table.js",
"lodash/lodash.js",
],
});
var clientTree = new MergeTrees(["test-client", bowerTree], {
annotation: "test-client merge",
});
var testClient = new Concat(clientTree, {
headerFiles: [
"test-client.js",
"test-session.js",
"headjs/dist/1.0.0/head.js",
"lodash/lodash.js",
"benchmark/benchmark.js",
"rsvp/rsvp.js",
"ascii-table/ascii-table.js",
"people.js",
],
outputFile: "/assets/test-client.js",
});
var compileTemplatesTree = new Funnel("compile-templates", {
include: ["index.{html,js}"],
destDir: "compile-templates",
});
var benchmarksIndexJs = new Funnel("benchmarks", {
include: ["**/*.js"],
destDir: "benchmarks",
});
var benchmarksIndexHtml = new CopyIndex(benchmarksIndexJs, {
annotation: "Copy index.html to benchmark",
});
var emberTree = new Funnel("ember", {
include: ["**/*.js"],
destDir: "ember",
});
module.exports = function (defaults) {
var app = new EmberApp(defaults, {
"ember-bootstrap": {
bootstrapVersion: 4,
importBootstrapCSS: true,
},
fingerprint: {
enabled: false,
},
});
app.import("vendor/bootstrap.css");
return new MergeTrees(
[
app.toTree(),
testClient,
compileTemplatesTree,
benchmarksIndexJs,
benchmarksIndexHtml,
emberTree,
],
{
annotation: "final dist merge",
}
);
};