-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
125 lines (114 loc) · 2.27 KB
/
gulpfile.babel.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
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
122
123
124
125
'use strict';
/**
* External dependencies
*/
import {
parallel,
series,
} from 'gulp';
/**
* Internal dependencies
*/
import {
cleanCSS,
cleanJS,
} from './gulp/clean';
import { copyPluginMainFile } from './gulp/bootstrap/plugin';
import { copyThemeMainFiles } from './gulp/bootstrap/theme';
import generateCert from './gulp/generateCert';
import images from './gulp/images';
import php from './gulp/php';
import { serve } from './gulp/browserSync';
import scripts from './gulp/scripts';
import styles from './gulp/styles';
import editorStyles from './gulp/editorStyles';
import translate from './gulp/translate';
import watch from './gulp/watch';
import start from './gulp/export/start';
import stringReplace from './gulp/export/stringReplace';
import compress from './gulp/export/compress';
import { verifyMainFile } from './gulp/helper/promise';
import copyProjectFiles, { updateProjectMainFiles } from './gulp/export/project';
import { bundleScripts } from './gulp/webpack/webpack';
/**
* Export for bootstrapping project by its type before developing project.
*/
export const bootstrapProject = copyProjectFiles;
/**
* Map out the sequence of events on first load and make it the default task.
*/
export const developProject = series(
cleanCSS,
cleanJS,
parallel(
php,
images,
series(
styles,
editorStyles
),
scripts,
bundleScripts,
),
serve,
watch
);
export default developProject;
/**
* Build project for development without BrowserSync or watching.
*/
export const buildDev = parallel(
php,
images,
series(
styles,
editorStyles
),
scripts,
translate
);
/**
* Export project for distribution.
*/
export const exportProject = series(
start,
parallel(
php,
scripts,
bundleScripts,
series(
styles,
editorStyles
),
images
),
translate,
stringReplace,
updateProjectMainFiles,
verifyMainFile,
compress
);
/**
* Export for bootstrapping theme before build process.
*/
export const bootstrapThemeProject = copyThemeMainFiles;
/**
* Export for bootstrapping plugin before build process.
*/
export const bootstrapPluginProject = copyPluginMainFile;
/**
* Export all imported functions as tasks.
*/
export {
generateCert,
images,
php,
scripts,
bundleScripts,
styles,
editorStyles,
translate,
watch,
cleanCSS,
cleanJS,
};