aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r--gulpfile.babel.js31
1 files changed, 27 insertions, 4 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index ae7002eb2..06e995d07 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -41,7 +41,18 @@ const paths = {
41 scripts: { 41 scripts: {
42 src: 'src/**/*.js', 42 src: 'src/**/*.js',
43 dest: 'build/', 43 dest: 'build/',
44 watch: 'src/**/*.js', 44 watch: [
45 // 'packages/**/*.js',
46 'src/**/*.js',
47 ],
48 },
49 packages: {
50 watch: 'packages/**/*',
51 // dest: 'build/',
52 // watch: [
53 // // 'packages/**/*.js',
54 // 'src/**/*.js',
55 // ],
45 }, 56 },
46}; 57};
47 58
@@ -74,8 +85,9 @@ export function mvSrc() {
74 [ 85 [
75 `${paths.src}/*`, 86 `${paths.src}/*`,
76 `${paths.src}/*/**`, 87 `${paths.src}/*/**`,
77 `!${paths.scripts.watch}`, 88 `!${paths.scripts.watch[1]}`,
78 `!${paths.src}/styles/**`, 89 `!${paths.src}/styles/**`,
90 `!${paths.src}/**/*.js`,
79 ], { since: gulp.lastRun(mvSrc) }, 91 ], { since: gulp.lastRun(mvSrc) },
80 ) 92 )
81 .pipe(gulp.dest(paths.dest)); 93 .pipe(gulp.dest(paths.dest));
@@ -90,6 +102,15 @@ export function mvPackageJson() {
90 .pipe(gulp.dest(paths.dest)); 102 .pipe(gulp.dest(paths.dest));
91} 103}
92 104
105export function mvLernaPackages() {
106 return gulp.src(
107 [
108 'packages/**',
109 ],
110 )
111 .pipe(gulp.dest(`${paths.dest}/packages`));
112}
113
93export function html() { 114export function html() {
94 return gulp.src(paths.html.src, { since: gulp.lastRun(html) }) 115 return gulp.src(paths.html.src, { since: gulp.lastRun(html) })
95 .pipe(gulp.dest(paths.html.dest)); 116 .pipe(gulp.dest(paths.html.dest));
@@ -118,7 +139,7 @@ export function scripts() {
118} 139}
119 140
120export function watch() { 141export function watch() {
121 gulp.watch(paths.scripts.watch, scripts); 142 gulp.watch(paths.packages.watch, mvLernaPackages);
122 gulp.watch(paths.styles.watch, styles); 143 gulp.watch(paths.styles.watch, styles);
123 144
124 gulp.watch([ 145 gulp.watch([
@@ -126,6 +147,8 @@ export function watch() {
126 `${paths.scripts.src}`, 147 `${paths.scripts.src}`,
127 `${paths.styles.src}`, 148 `${paths.styles.src}`,
128 ], mvSrc); 149 ], mvSrc);
150
151 gulp.watch(paths.scripts.watch, scripts);
129} 152}
130 153
131export function webserver() { 154export function webserver() {
@@ -161,7 +184,7 @@ export function sign(done) {
161 184
162const build = gulp.series( 185const build = gulp.series(
163 clean, 186 clean,
164 gulp.parallel(mvSrc, mvPackageJson), 187 gulp.parallel(mvSrc, mvPackageJson, mvLernaPackages),
165 gulp.parallel(html, scripts, styles), 188 gulp.parallel(html, scripts, styles),
166 dictionaries, 189 dictionaries,
167); 190);