-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp.options.js
47 lines (38 loc) · 1.09 KB
/
gulp.options.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
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default {
/** @type import('pug').Options */
pug: {
pretty: true,
basedir: join(__dirname, 'src'),
},
/** @type import('node-sass').Options */
sass: {
includePaths: ['node_modules/normalize.css', 'node_modules/gerillass/scss'],
errLogToConsole: true,
outputStyle: 'compressed',
},
/** @type Parameters<import('gulp-babel')>[0] */
scripts: {
presets: ['@babel/env'],
},
/** @type import('gulp-autoprefixer').Options */
autoprefixer: ['last 15 versions'],
/** @type import('gulp-clean-css').Details */
cleanCss: {
level: { 1: { specialComments: 0 } },
},
/** @type import('imagemin-mozjpeg').Options */
mozjpeg: {
quality: 95,
progressive: true,
},
/** @type import('imagemin-optipng').Options */
optipng: { optimizationLevel: 5 },
/** @type import('imagemin-svgo').Options */
svgo: {
plugins: [{ removeViewBox: true }, { cleanupIDs: false }],
},
};