forked from sparkdesignsystem/spark-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
executable file
·129 lines (124 loc) · 2.96 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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',
},
images: {
src: './src/assets/toolkit/images/*.*',
dest: './dist/assets/toolkit/images',
},
js: {
plugins: {
webpack: {
entry: {
'babel-polyfill': './src/assets/drizzle/scripts/drizzle.js',
// Drizzle UI scripts
'drizzle/scripts/drizzle': './src/assets/drizzle/scripts/drizzle.js',
// Common toolkit scripts
'toolkit/scripts/toolkit': './src/assets/toolkit/scripts/toolkit.js',
'toolkit/scripts/toolkit-prerender': './src/assets/toolkit/scripts/toolkit-prerender.js',
},
output: {
path: './dist/assets',
filename: '[name].js',
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader'],
},
],
},
devtool: 'source-map',
externals: {},
},
},
},
serve: {
plugins: {
browserSync: {
open: false,
notify: false,
files: ['./dist/**/*'],
server: { baseDir: './dist' },
},
},
},
watch: {
watchers: [
{
match: ['./src/static/**/*'],
tasks: ['copy'],
},
{
match: [
'./src/assets/**/*.scss',
'./packages/spark-core/**/*.scss',
'./packages/spark-extras/**/*.scss',
],
tasks: ['sass'],
},
{
match: [
'./src/assets/**/*.js',
'./packages/spark-core/**/*.js',
'./packages/spark-extras/**/*.js',
],
tasks: ['build-es5', 'js'],
},
{
match: [
'./src/**/*.hbs',
'!./src/templates/drizzle/spark-core-icons.hbs',
'./src/data/**/*',
'./src/**/*.yaml',
'./src/**/*.md',
],
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',
},
},
};