-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrunch-config.js
63 lines (62 loc) · 1.65 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
const paths = require("./config").paths;
const metalsmith = require("./metalsmith");
exports.config = {
// See http://brunch.io/docs/config for docs.
plugins: {
eslint: {
pattern: new RegExp(`^${paths.source}\\\/.*\\.js$`),
warnOnly: false
},
stylelint: {
pattern: new RegExp(`^${paths.metalDest}\\\/.*\\.css$`),
warnOnly: false
},
before: {
pattern: new RegExp(`^(${paths.source}|layouts)`),
func: metalsmith.build.bind(metalsmith)
},
cleancss: {
keepSpecialComments: 0,
removeEmpty: true
},
uglify: {
mangle: true,
ignored: /tmp/
},
copycat:{
webfonts: ["node_modules/@fortawesome/fontawesome-free/webfonts"]
},
browserSync: { open: false }
},
paths: {
watched: [paths.source, paths.metalDest, "layouts"],
public: paths.brunchDest
},
conventions: {
assets: new RegExp(`${paths.metalDest}\\\/assets\\\/`)
},
npm: {
styles: {
"bootstrap": ["dist/css/bootstrap.css"],
"@fortawesome": ["fontawesome-free/css/all.css"]
}
},
files: {
javascripts: {
joinTo: {
[`${paths.js}/app.js`]: `${paths.metalDest}/**/*.js`,
[`${paths.js}/vendor.js`]: /^node_modules/,
[`${paths.js}/tmp`]: [`${paths.source}/**/*.js`, "layouts/**/*.js"]
}
},
stylesheets: {
joinTo: {
[`${paths.css}/app.css`]: `${paths.metalDest}/styles/app.css`,
[`${paths.css}/custom.css`]: `${paths.metalDest}/styles/custom.css`,
[`${paths.css}/vendor.css`]: /^node_modules/,
[`${paths.css}/tmp`]: [`${paths.source}/**/*.css`]
}
}
},
sourceMaps: "absoluteUrl"
};