forked from fourkitchens/emulsify-gulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-config.js
124 lines (122 loc) · 3.38 KB
/
gulp-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
/* globals module */
(() => {
const themeDir = './';
const paths = {
js: `${themeDir}/components/_patterns/**/*.js`,
dist_js: `${themeDir}/dist`,
sass: themeDir,
icons: `${themeDir}/images/icons/src`,
img: [
`${themeDir}/images/**/*`,
`${themeDir}/components/_patterns/**/*.{jpg, gif, png, svg}`,
],
dist_css: `${themeDir}/dist/css`,
pattern_lab: `${themeDir}/pattern-lab/public`,
theme_images: `${themeDir}/images`,
logo: `${themeDir}/logo.png`,
};
module.exports = {
host: 'http://127.0.0.1:8888/',
themeDir,
paths,
sassOptions: {
outputStyle: 'expanded',
eyeglass: {
enableImportOnce: false,
},
},
cssConfig: {
src: `${themeDir}/components/_patterns/**/*.scss`,
dest: `${themeDir}/dist/`,
flattenDestOutput: true,
lint: {
enabled: false,
failOnError: true,
},
cleanCSS: {
enabled: true,
options: {
compatibility: '*',
format: false,
inline: 'local',
inlineTimeout: 5000,
level: 1,
rebase: true,
sourceMap: false,
sourceMapInlineSources: false
}
},
sourceComments: false,
sourceMapEmbed: false,
outputStyle: 'expanded',
autoPrefixerBrowsers: ['last 2 versions', 'IE >= 11'],
includePaths: ['./node_modules'],
},
iconConfig: {
mode: {
symbol: {
// symbol mode to build the SVG
dest: 'dist/img/sprite', // destination foldeer
sprite: 'sprite.svg', // sprite name
example: false, // Don't build sample page
},
},
svg: {
xmlDeclaration: false, // strip out the XML attribute
doctypeDeclaration: false, // don't include the !DOCTYPE declaration
},
},
patternLab: {
enabled: true,
configFile: `${themeDir}pattern-lab/config/config.yml`,
watchedExtensions: ['twig', 'json', 'yaml', 'yml', 'md', 'jpg', 'jpeg', 'png'],
scssToYAML: [
{
src: `${themeDir}/components/_patterns/00-base/global/01-colors/_color-vars.scss`,
dest: `${themeDir}/components/_patterns/00-base/global/01-colors/colors.yml`,
lineStartsWith: '$',
allowVarValues: false,
},
],
},
browserSync: {
enabled: true,
baseDir: './',
startPath: 'pattern-lab/public/',
// Uncomment below if using a specific local url
// domain: 'emulsify.dev',
notify: false,
openBrowserAtStart: false,
reloadOnRestart: true,
ui: false,
// Clicks, Scrolls & Form inputs on any device will be mirrored to all others.
// ghostMode: false to turn all off
ghostMode: {
clicks: true,
forms: true,
scroll: true,
location: true
}
},
wpt: {
// WebPageTest API key https://www.webpagetest.org/getkey.php
// key:
},
pa11y: {
includeNotices: true,
includeWarnings: true,
ignore: [
'WCAG2AA.Principle2.Guideline2_4.2_4_2.H25.2',
'WCAG2AA.Principle2.Guideline2_4.2_4_2.H25.1.NoTitleEl',
'WCAG2AA.Principle3.Guideline3_1.3_1_1.H57.2',
'WCAG2AA.Principle3.Guideline3_2.3_2_1.G107',
],
hideElements: '',
rootElement: null,
rules: [],
standard: 'WCAG2AA',
wait: 250,
actions: [],
},
};
})();