forked from justcoded/web-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp-config.js
78 lines (78 loc) · 1.99 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
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: 'style.scss',
mainScssMin: 'style.min.css',
vendorScss: 'vendor.scss',
vendorScssMin: 'vendor.min.css',
},
task: {
htmlHint: 'html-hint',
jsHint: 'js-hint',
buildCustomJs: 'build-custom-js',
buildJsVendors: 'build-js-vendors',
buildSass: 'build-sass',
buildSassProd: 'build-sass-production',
buildStylesVendors: 'build-styles-vendors',
imageMin: 'image-min',
imageClean: 'image-clean',
cleanProd: 'clean-production',
cleanBuild: 'clean-build',
copyFolders: 'copy-folders',
copyFoldersProduction: 'copy-folders-production',
browserSync: 'browser-sync-server',
watch: 'watch',
},
autoprefixer: {
versions: 'last 4 versions'
},
imageExtensions: 'jpg|jpeg|png|svg|gif|ico|tiff',
ignoreProd: function() {
return [
`!${this.folder.src}/`,
`!${this.folder.src}/**/*`,
'!bower/',
'!bower/**/*',
'!node_modules/**/*',
'!node_modules/',
`!${this.folder.build}/css/**.map`,
`!${this.folder.build}/images/info.txt`,
'!.bowerrc',
'!bower.json',
'!.gitignore',
'!gulpfile.js',
'!LICENSE',
'!package.json',
`!${this.folder.prod}`,
'!README.md',
'!readme.txt',
'!CONTRIBUTING.md',
'!gulp-config.js',
'!package-lock.json',
'!tasks/',
'!tasks/**/*'
];
},
foldersToCopy: function() {
return [
`./${this.folder.src}/**/*`,
`!./${this.folder.src}/images/`,
`!./${this.folder.src}/images/**/*`,
`!./${this.folder.src}/js/`,
`!./${this.folder.src}/js/**/*`,
`!./${this.folder.src}/scss/`,
`!./${this.folder.src}/scss/**/*`,
`!./${this.folder.src}/vendor_entries/`,
`!./${this.folder.src}/vendor_entries/**/*`
];
}
};