-
Notifications
You must be signed in to change notification settings - Fork 3
/
brunch-config.js
65 lines (59 loc) · 1.3 KB
/
brunch-config.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
exports.files = {
javascripts: {
joinTo: {
'fateOfAllFools.js': /^(?!spec)/
}
},
stylesheets: {
joinTo: 'fateOfAllFools.css'
}
};
/*
Tests are handled by Karma. This is to silence a warning that Brunch
reports (which is helpful actually in most cases!) because it sees JS files
outside the scope of its purview.
*/
exports.conventions = {
ignored: /^spec/
};
/*
Inject our message bus (wrapper around Postal) in to each module. We use
the bus to communicate and need a hook to be able to silence events when
those modules are not under test.
*/
exports.modules = {
wrapper: (path, data) => {
const fateBusTemplate = `
const fateBus = require('fateBus.js');
fateBus.registerModule(module);
`;
return `
require.register("${path}", function(exports, require, module) {
${(path === 'fateBus.js') ? ('') : (fateBusTemplate)}
${data}
});`
},
autoRequire: {
'fateOfAllFools.js': ['main.js']
}
}
exports.npm = {
styles: {
'jquery-toast-plugin': ['src/jquery.toast.css']
}
}
exports.plugins = {
uglify: {
output: {
comments: true
}
}
}
exports.overrides = {
production: {
optimize: true,
plugins: {autoReload: {enabled: false}}
}
}
// Doesn't fit our debugging style
exports.sourceMaps = false;