-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp-config.js
executable file
·84 lines (84 loc) · 2.26 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
module.exports = {
folder: {
tasks: 'tasks',
src: 'src',
build: 'assets',
prod: 'production',
},
file: {
mainHtml: 'index.html',
mainJs: 'app.js',
vendorJs: 'vendor.js',
vendorJsMin: 'vendor.min.js',
mainScss: 'styles.scss',
mainScssMin: 'styles.min.css',
vendorScss: 'vendor.scss',
vendorScssMin: 'vendor.min.css',
},
fileInclude: {
templates: 'src/html/templates',
dest: './',
},
task: {
htmlHint: 'html-hint',
esLint: 'es-lint',
buildCustomJs: 'build-custom-js',
buildJsVendors: 'build-js-vendors',
buildSass: 'build-sass',
buildSassCustom: 'build-sass-custom',
buildStylesVendors: 'build-styles-vendors',
imageMin: 'image-min',
imageWebP: 'image-webp',
svgSprite: 'svg-sprite',
cleanProd: 'clean-production',
cleanBuild: 'clean-build',
copyFolders: 'copy-folders',
copyFoldersProduction: 'copy-folders-production',
fileInclude: 'file-include',
browserSync: 'browser-sync-server',
watch: 'watch',
},
autoprefixer: {
browserslist: ['.browserslistrc'],
},
imageExtensions: 'jpg|jpeg|png|svg|gif|ico|tiff',
getPathesForSassCompiling: function () {
return {
files: [],
isGcmq: false,
};
},
getPathesToCopyForProduction: function () {
return [
'./**/*',
'!.*',
'!.*/**',
'.htaccess',
`!${this.folder.prod}`,
`!${this.folder.build}/images/info.txt`,
`!{${this.folder.src},${this.folder.src}/**}`,
'!{tasks,tasks/**}',
'!{node_modules,node_modules/**}',
'!CONTRIBUTING.md',
'!gulpfile.js',
'!gulp-config.js',
'!LICENSE',
'!package.json',
'!package-lock.json',
'!README.md',
'!readme.txt',
'!{sys_icon,sys_icon/**}',
];
},
getPathesToCopy: function () {
return [
`./${this.folder.src}/**`,
`!{${this.folder.src}/icon-svg,${this.folder.src}/icon-svg/**}`,
`!{${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/**}`,
];
},
};