-
Notifications
You must be signed in to change notification settings - Fork 48
/
gulp-config.js
87 lines (87 loc) · 2.18 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
module.exports = {
task: {
lintHtml: 'lint-html',
lintJs: 'lint-js',
fixJs: 'fix-js',
buildHtml: 'build-html',
buildJs: 'build-js',
buildStyles: 'build-styles',
buildStylesCustom: 'build-styles-custom',
buildStylesVendors: 'build-styles-vendors',
buildImages: 'build-images',
cleanBuild: 'clean-build',
copyFiles: 'copy-files',
copyFilesProd: 'copy-files-production',
browserSync: 'browser-sync',
watch: 'watch',
build: 'build',
},
folder: {
tasks: 'tasks',
src: 'src',
dev: 'assets',
build: 'production',
},
file: {
mainHtml: 'index.html',
mainJs: 'app.js',
mainJsMin: 'app.min.js',
vendorJs: 'vendor.js',
vendorJsMin: 'vendor.min.js',
mainStylesSrc: 'styles.scss',
mainStyles: 'styles.css',
mainStylesMin: 'styles.min.css',
vendorStylesSrc: 'vendor.scss',
vendorStyles: 'vendor.css',
vendorStylesMin: 'vendor.min.css',
},
buildHtml: {
templates: 'src/html/templates',
},
buildStyles: {
// Sorting type css media queries: 'desktop-first' || 'mobile-first'
sortType: 'desktop-first',
},
buildJs: {
externalLibs: {},
},
buildImages: {
imageExtensions: 'jpg,jpeg,png,svg,gif,ico',
isImageMin: false,
},
error: {
sound: true,
title: '< SYSTEM ERROR >',
icon: './system_files/icons/error_icon.png',
wait: true,
},
getFilesForStylesCustom() {
return {
files: [],
// gcmq - group css media queries
isGcmq: false,
};
},
getFilesToCopy() {
return [
`./${this.folder.src}/**`,
`!{${this.folder.src}/images,${this.folder.src}/images/**}`,
`!{${this.folder.src}/js,${this.folder.src}/js/**}`,
`!{${this.folder.src}/html,${this.folder.src}/html/**}`,
`!{${this.folder.src}/scss,${this.folder.src}/scss/**}`,
`!{${this.folder.src}/vendor_entries,${this.folder.src}/vendor_entries/**}`,
];
},
getFilesToCopyProd() {
return [
`./${this.folder.dev}/**`,
'.htaccess',
];
},
isProduction() {
return process.argv[process.argv.length - 1] === this.task.build;
},
isFixJs() {
return process.argv[process.argv.length - 1] === this.task.fixJs;
}
};