From 8a3e26cdb8e5b8c6fda4ba1ac6bd06efd627455d Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Tue, 29 Jan 2019 16:31:05 +0900 Subject: [PATCH] Sort tasks by topological ordering --- gulpfile.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index 9a674a3eaf..56949a7067 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -32,14 +32,6 @@ if (isDebug) { console.warn(chalk.yellow.bold(' built script will not be compressed.')); } -gulp.task('build', gulp.parallel( - 'build:ts', - 'build:copy', - 'build:client', - 'locales', - 'doc' -)); - gulp.task('build:ts', () => { const tsProject = ts.createProject('./tsconfig.json'); @@ -66,8 +58,6 @@ gulp.task('build:copy', gulp.parallel('build:copy:views', () => ]).pipe(gulp.dest('./built/')) )); -gulp.task('test', gulp.task('mocha')); - gulp.task('lint', () => gulp.src('./src/**/*.ts') .pipe(tslint({ @@ -93,6 +83,8 @@ gulp.task('mocha', () => } as any)) ); +gulp.task('test', gulp.task('mocha')); + gulp.task('clean', cb => rimraf('./built', cb) ); @@ -101,14 +93,6 @@ gulp.task('cleanall', gulp.parallel('clean', cb => rimraf('./node_modules', cb) )); -gulp.task('default', gulp.task('build')); - -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'); return gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js']) @@ -154,3 +138,19 @@ gulp.task('doc', () => .pipe((cssnano as any)()) .pipe(gulp.dest('./built/docs/assets/')) ); + +gulp.task('build:client', gulp.parallel( + 'build:client:script', + 'build:client:styles', + 'copy:client' +)); + +gulp.task('build', gulp.parallel( + 'build:ts', + 'build:copy', + 'build:client', + 'locales', + 'doc' +)); + +gulp.task('default', gulp.task('build'));