-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpconfig.js
More file actions
121 lines (99 loc) · 2.61 KB
/
gulpconfig.js
File metadata and controls
121 lines (99 loc) · 2.61 KB
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
const autoprefixer = require('autoprefixer');
// Paths
// --------------
const devBase = './src';
const buildBase = './temp';
const tempBase = './temp';
const contentBase = './content';
const staticBase = './static';
// SASS
// --------------
const sassBase = `${devBase}/scss`;
const sassBuild = `${buildBase}/assets/css`;
const sassAll = [`${sassBase}/*.scss`, `!${sassBase}/_*.scss`];
const sassCustom = [
`${sassBase}/*.scss`,
`!${sassBase}/u-*.scss`,
`!${sassBase}/bootstrap.scss`,
];
const sassCore = [`${sassBase}/bootstrap.scss`];
const sassUtils = [`${sassBase}/u-*.scss`];
const injectCss = `${sassBuild}/*.css`;
// JavaScript
// --------------
const jsBase = `${devBase}/js`;
const jsFiles = `${jsBase}/*.js`;
const jsBuild = `${buildBase}/assets/js`;
const injectJs = `${jsBuild}/*.js`;
const injectCdnJs = [
'<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js" integrity="sha512-X/YkDZyjTf4wyc2Vy16YGCPHwAY8rZJY+POgokZjQB2mhIRFJCckEGc6YyX9eNsPfn0PzThEuNs+uaomE5CO6A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>',
];
// Templates
// --------------
const tplBase = `${devBase}/templates`;
const tplBuild = buildBase;
const tplPagesBase = `${tplBase}/pages`;
const tplTemplatesBase = `${tplBase}`;
// Datasets from Markdown to JSON
// ----------------
const datasetPagesSource = `${contentBase}/pages/**/*.md`;
const datasetPagesBuild = `${tempBase}/_dataset-pages`;
// GFX
// --------------
const gfxBase = `${devBase}/gfx`;
const gfxBuild = `${buildBase}/assets/images`;
const jpgBase = `${gfxBase}/**`;
const imagesJpg = [`${jpgBase}/*.jpg`, `!${devBase}/favicon/**/*.*`];
const pngBase = `${gfxBase}/**`;
const imagesPng = [`${pngBase}/*.png`, `!${pngBase}/favicon/**/*.*`];
const svgBase = `${gfxBase}/**`;
const imagesSvg = [`${svgBase}/*.svg`, `!${devBase}/favicon/**/*.*`];
// Modules & Plugins
// --------------
const postcssPluginsBase = [
autoprefixer({
grid: true,
}),
];
const fontloadFile = `${devBase}/fonts.list`;
const fontLoadConfig = {
fontsDir: 'assets/font/',
cssDir: 'assets/css/',
cssFilename: 'fonts.scss',
relativePaths: true,
fontDisplayType: 'swap',
};
// Exports
// --------------
module.exports = {
buildBase,
contentBase,
datasetPagesBuild,
datasetPagesSource,
devBase,
fontLoadConfig,
fontloadFile,
gfxBase,
gfxBuild,
imagesJpg,
imagesPng,
imagesSvg,
injectCdnJs,
injectCss,
injectJs,
jsBuild,
jsFiles,
postcssPluginsBase,
sassAll,
sassBase,
sassBuild,
sassCore,
sassCustom,
sassUtils,
staticBase,
tempBase,
tplBase,
tplBuild,
tplPagesBase,
tplTemplatesBase,
};