forked from Kunstmaan/KunstmaanBundlesCMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
executable file
·110 lines (90 loc) · 2.86 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
/* eslint-env node */
import gulp from 'gulp';
import {adminBundle} from './groundcontrol/admin-bundle.tasks';
import {dashboardBundle} from './groundcontrol/dashboard-bundle.tasks';
import {mediaBundle} from './groundcontrol/media-bundle.tasks';
import {translatorBundle} from './groundcontrol/translator-bundle.tasks';
import startLocalTask, { buildOnChange, testOnChange } from './groundcontrol/start-local.task';
import createBuildGroundControlSkeletonTask from './groundcontrol/tasks/build-gc-skeleton';
// AdminBundle Tasks
const analyzeAdminBundle = gulp.series(
adminBundle.tasks.eslint,
adminBundle.tasks.stylelint,
);
const buildLocalAdminBundle = gulp.series(
adminBundle.tasks.copy,
adminBundle.tasks.cssLocal,
adminBundle.tasks.cssNextLocal,
adminBundle.tasks.scripts,
adminBundle.tasks.bundle
);
const buildOptimizedAdminBundle = gulp.series(
adminBundle.tasks.copy,
adminBundle.tasks.cssOptimized,
adminBundle.tasks.cssNextOptimized,
adminBundle.tasks.scripts,
adminBundle.tasks.bundlePolyfills,
adminBundle.tasks.bundleOptimized
);
// DashboardBundle Tasks
const buildLocalDashboardBundle = gulp.series(
dashboardBundle.tasks.cssLocal,
dashboardBundle.tasks.scripts,
dashboardBundle.tasks.scriptsSetup
);
const buildOptimizedDashboardBundle = gulp.series(
dashboardBundle.tasks.cssOptimized,
dashboardBundle.tasks.scripts,
dashboardBundle.tasks.scriptsSetup
);
// MediaBundle Tasks
const buildLocalMediaBundle = gulp.series(
mediaBundle.tasks.scripts
);
const buildOptimizedMediaBundle = gulp.series(
mediaBundle.tasks.scripts
);
// TranslatorBundle Tasks
const buildLocalTranslatorBundle = gulp.series(
translatorBundle.tasks.cssLocal,
translatorBundle.tasks.scripts
);
const buildOptimizedTranslatorBundle = gulp.series(
translatorBundle.tasks.cssOptimized,
translatorBundle.tasks.scripts
);
// Combine bundles
const analyze = gulp.series(
analyzeAdminBundle
);
const test = gulp.series(
analyze
);
const buildLocal = gulp.series(
buildLocalAdminBundle,
buildLocalDashboardBundle,
buildLocalMediaBundle,
buildLocalTranslatorBundle
);
const buildOptimized = gulp.series(
buildOptimizedAdminBundle,
buildOptimizedDashboardBundle,
buildOptimizedMediaBundle,
buildOptimizedTranslatorBundle
);
const testAndBuildOptimized = gulp.series(
test,
buildOptimized
);
// Setting up server, local dev
const startLocal = gulp.series(
buildLocal,
startLocalTask,
analyze,
buildOnChange,
testOnChange,
);
// Development sepcific tasks
const buildGroundControlSkeleton = gulp.series(createBuildGroundControlSkeletonTask('./src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol'));
// Export public tasks
export {test, buildOptimized, testAndBuildOptimized, startLocal, buildGroundControlSkeleton};