-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
49 lines (42 loc) · 1.45 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
/* eslint-env es6 */
/* eslint no-undef: "off" */
'use strict';
// External dependencies
import {parallel, series} from 'gulp';
// Internal dependencies
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 prodPrep from './gulp/prodPrep';
import prodStringReplace from './gulp/prodStringReplace';
import prodCompress from './gulp/prodCompress';
import {cleanCSS, cleanJS} from './gulp/clean';
/**
* Map out the sequence of events on first load and make it the default task
*/
export const firstRun = series(
cleanCSS, cleanJS, parallel(php, images, series( styles, editorStyles ), scripts), serve, watch
);
export default firstRun;
/**
* Build theme for development without BrowserSync or watching
*/
export const buildDev = parallel(
php, images, series( styles, editorStyles ), scripts, translate
);
/**
* Export theme for distribution.
*/
export const bundleTheme = series(
prodPrep, parallel(php, scripts, series( styles, editorStyles ), images), translate, prodStringReplace, prodCompress
);
/**
* Export all imported functions as tasks
*/
export { generateCert, images, php, scripts, styles, editorStyles, translate, watch, cleanCSS, cleanJS };