-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
38 lines (30 loc) · 924 Bytes
/
gulpfile.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
const gulp = require("gulp");
const gutil = require("gulp-util");
const install = require('gulp-install');
const path = require('path');
const shell = require('gulp-shell');
// Tasks relating build
gulp.task('build:server', shell.task('cd server && npm run build'));
gulp.task('build:client', shell.task('cd client && npm run build'));
gulp.task('build', gulp.series(
'build:server',
'build:client',
));
// Tasks relating dependencies
gulp.task('dependencies:client', () => {
return gulp.src(['./client/package.json']).pipe(install());
});
gulp.task('dependencies:server', () => {
return gulp.src(['./server/package.json']).pipe(install());
});
gulp.task('dependencies', gulp.series(
'dependencies:client',
'dependencies:server',
));
// Postinstall
gulp.task('postinstall', gulp.series(
'dependencies',
'build',
));
// Default task
gulp.task('default', gulp.parallel('dependencies'));