summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2019-01-29 16:26:33 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2019-01-29 17:10:16 +0900
commit7301671962639d4f37a67069eed44007b45f47b2 (patch)
tree1ab464557c91c10eb3f39b138aaa242be6bef588
parentRemove duplicated dependencies (diff)
downloadsharkey-7301671962639d4f37a67069eed44007b45f47b2.tar.gz
sharkey-7301671962639d4f37a67069eed44007b45f47b2.tar.bz2
sharkey-7301671962639d4f37a67069eed44007b45f47b2.zip
Use parallel and task to specify dependencies
-rw-r--r--gulpfile.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/gulpfile.ts b/gulpfile.ts
index b4ffcd7025..9a674a3eaf 100644
--- a/gulpfile.ts
+++ b/gulpfile.ts
@@ -32,13 +32,13 @@ if (isDebug) {
console.warn(chalk.yellow.bold(' built script will not be compressed.'));
}
-gulp.task('build', [
+gulp.task('build', gulp.parallel(
'build:ts',
'build:copy',
'build:client',
'locales',
'doc'
-]);
+));
gulp.task('build:ts', () => {
const tsProject = ts.createProject('./tsconfig.json');
@@ -56,7 +56,7 @@ gulp.task('build:copy:views', () =>
gulp.src('./src/server/web/views/**/*').pipe(gulp.dest('./built/server/web/views'))
);
-gulp.task('build:copy', ['build:copy:views'], () =>
+gulp.task('build:copy', gulp.parallel('build:copy:views', () =>
gulp.src([
'./build/Release/crypto_key.node',
'./src/const.json',
@@ -64,9 +64,9 @@ gulp.task('build:copy', ['build:copy:views'], () =>
'./src/**/assets/**/*',
'!./src/client/app/**/assets/**/*'
]).pipe(gulp.dest('./built/'))
-);
+));
-gulp.task('test', ['mocha']);
+gulp.task('test', gulp.task('mocha'));
gulp.task('lint', () =>
gulp.src('./src/**/*.ts')
@@ -97,17 +97,17 @@ gulp.task('clean', cb =>
rimraf('./built', cb)
);
-gulp.task('cleanall', ['clean'], cb =>
+gulp.task('cleanall', gulp.parallel('clean', cb =>
rimraf('./node_modules', cb)
-);
+));
-gulp.task('default', ['build']);
+gulp.task('default', gulp.task('build'));
-gulp.task('build:client', [
+gulp.task('build:client', gulp.parallel(
'build:client:script',
'build:client:styles',
'copy:client'
-]);
+));
gulp.task('build:client:script', () => {
const client = require('./built/client/meta.json');