-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathgulpfile.babel.js
58 lines (53 loc) · 1.33 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
import { serve, watch } from './gulp/tasks/server.js';
import gulp from 'gulp';
import require from './gulp/tasks/require.js';
import writeVersion from './gulp/tasks/write-version.js';
import { lint, minifyJs, minifyJsApp } from './gulp/tasks/javascript.js';
import { templates, templatesApp } from './gulp/tasks/templates.js';
import { compileSass, css, minifyCssApp } from './gulp/tasks/style.js';
import {
writeConfigProd,
writeConfigDev,
writeConfigApp
} from './gulp/tasks/write-config.js';
import {
cleanFolders,
moveDistDev,
moveFilesToTmp
} from './gulp/tasks/clean-move.js';
const buildProd = gulp.series(
moveFilesToTmp,
compileSass,
templates,
require,
minifyJs,
css,
writeConfigProd,
writeVersion,
cleanFolders
);
const buildDev = gulp.series(
moveFilesToTmp,
compileSass,
writeConfigDev,
writeVersion,
cleanFolders
);
const buildApp = gulp.series(
moveFilesToTmp,
compileSass,
templatesApp,
require,
minifyJsApp,
minifyCssApp,
writeConfigApp,
cleanFolders
);
gulp.task('lint', lint);
gulp.task('build-app', buildApp);
gulp.task('build-dev', buildDev);
gulp.task('serve-dev', gulp.series(buildDev, serve, watch));
gulp.task('build-prod', buildProd);
gulp.task('serve-prod', gulp.series(buildProd, serve));
gulp.task('build-all', gulp.series(buildDev, moveDistDev, buildProd));
export default gulp.series('serve-dev');