-
Notifications
You must be signed in to change notification settings - Fork 30
/
config.js
111 lines (104 loc) · 2.28 KB
/
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
'use strict';
module.exports = {
'css:toolkit': {
src: './src/assets/toolkit/styles/*.css',
dest: './dist/assets/toolkit/styles',
name: 'css:toolkit'
},
'css:drizzle': {
src: './src/assets/**/drizzle.css',
dest: './dist/assets',
prefix: 'drizzle-',
name: 'css:drizzle'
},
copy: {
src: './src/static/**/*',
dest: './dist'
},
js: {
plugins: {
webpack: {
entry: {
// Drizzle UI scripts
'drizzle/scripts/drizzle': './src/assets/drizzle/scripts/drizzle.js',
// Common toolkit scripts
'toolkit/scripts/toolkit': './src/assets/toolkit/scripts/toolkit.js'
},
output: {
path: './dist/assets',
filename: '[name].js'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader']
}
]
},
externals: {}
}
}
},
serve: {
plugins: {
browserSync: {
open: false,
notify: false,
files: ['./dist/**/*'],
server: { baseDir: './dist' }
}
}
},
watch: {
watchers: [
{
match: ['./src/static/**/*'],
tasks: ['copy']
},
{
match: ['./src/assets/**/*.css'],
tasks: ['css']
},
{
match: ['./src/assets/**/*.js'],
tasks: ['js']
},
{
match: ['./src/**/*.hbs', './src/data/**/*'],
tasks: ['drizzle']
}
]
},
drizzle: {
beautifier: {
/* eslint-disable camelcase */
indent_char: ' ',
indent_size: 2,
indent_with_tabs: false,
max_preserve_newlines: 1,
wrap_line_length: 0,
unformatted: `a abbr acronym address b bdo big cite code col del dfn dt em font
h1 h2 h3 h4 h5 h6 i img ins kbd mark pre q s samp small span
strike strong sub sup tt u var`.split(' ')
/* eslint-enable camelcase */
},
src: {
patterns: {
basedir: './src/patterns',
glob: './src/patterns/**/*.hbs'
},
templates: {
basedir: './src/templates',
glob: './src/templates/**/*.hbs'
}
},
dest: {
pages: './dist',
patterns: './dist/patterns'
},
fieldParsers: {
notes: 'markdown'
}
}
};