-
Notifications
You must be signed in to change notification settings - Fork 0
/
brunch-config.js
80 lines (80 loc) · 1.62 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = {
paths: {
watched: ['src'],
public: 'www/src'
},
modules: {
autoRequire: {
'js/main.js': ['src/main']
}
},
npm: {
globals: {
$: 'jquery',
jQuery: 'jquery'
},
styles: {
'slick-carousel': [
'slick/slick.css',
'slick/slick-theme.css'
],
'normalize.css': ['normalize.css']
}
},
files: {
javascripts: {
joinTo: {
'js/vendor.js': /^(?!src\/)/,
'js/main.js': /^(src\/.*\.js)/ // as hbs files are considered js, target only real .js
}
},
stylesheets: {
joinTo: {
'css/vendor.css': /^node_modules/,
'css/main.css': /^(src\/)/
},
order: {
before: [/^(src\/styles\/)/]
}
}
},
plugins: {
static: {
processors: [
require('html-brunch-static')({
partials: '/src/components?/',
layouts: '/src/layouts?/',
handlebars: {
enableProcessor: true
},
processors: [
require('pug-brunch-static')({
pretty: true,
fileMatch: /\.static\.pug$/,
fileTransform: (filename) => filename.replace(/\.static\.pug$/, '.html')
})
]
})
]
},
svgo: {
plugins: [{
'removeTitle': true,
'removeComments': true
}]
},
cleancss: {
keepSpecialComments: 0,
removeEmpty: true
},
babel: {
presets: ['latest']
},
postcss: {
processors: [
require('autoprefixer')(['last 5 versions']),
require('csswring')
]
}
}
};