-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBrocfile.js
54 lines (43 loc) · 1.2 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
46
47
48
49
50
51
52
53
var concat = require('broccoli-concat');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var compileES6 = require('broccoli-es6-concatenator');
// --- Compile ES6 modules ---
var loader = pickFiles('bower_components', {
srcDir: 'loader',
files: ['loader.js'],
destDir: '/'
});
var lib = pickFiles('lib', {
srcDir: '/',
files: ['**/*.js'],
destDir: '/'
});
var tests = pickFiles('tests', {
srcDir: '/',
files: ['*.js'],
destDir: '/tests'
});
var main = mergeTrees([loader, lib, tests]);
main = compileES6(main, {
loaderFile: '/loader.js',
inputFiles: ['**/*.js'],
ignoredModules: ['ember'],
outputFile: '/assets/klassy-tests.amd.js'
});
// --- Select and concat vendor / support files ---
var qunit = pickFiles('bower_components', {
srcDir: '/qunit/qunit',
files: ['qunit.js', 'qunit.css'],
destDir: '/assets'
});
var testIndex = pickFiles('tests', {
srcDir: '/',
files: ['index.html'],
destDir: '/tests'
});
var testSupport = concat('bower_components', {
inputFiles: ['ember-cli-test-loader/test-loader.js'],
outputFile: '/assets/test-support.js'
});
module.exports = mergeTrees([main, testIndex, qunit, testSupport]);