1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

gulp: simplify build

This commit is contained in:
nkzawa 2016-10-25 16:01:32 +09:00
parent ebecbcf89e
commit 36497ceaf7

View file

@ -96,11 +96,8 @@ gulp.task('copy-bench-fixtures', () => {
}) })
gulp.task('build', [ gulp.task('build', [
'build-dev-client' 'build-dev-client',
]) 'build-client'
gulp.task('build-release', [
'build-release-client'
]) ])
gulp.task('build-dev-client', ['compile-lib', 'compile-client'], () => { gulp.task('build-dev-client', ['compile-lib', 'compile-client'], () => {
@ -128,7 +125,7 @@ gulp.task('build-dev-client', ['compile-lib', 'compile-client'], () => {
.pipe(notify('Built dev client')) .pipe(notify('Built dev client'))
}) })
gulp.task('build-release-client', ['compile-lib', 'compile-client'], () => { gulp.task('build-client', ['compile-lib', 'compile-client'], () => {
return gulp return gulp
.src('dist/client/next.js') .src('dist/client/next.js')
.pipe(webpack({ .pipe(webpack({
@ -189,7 +186,7 @@ gulp.task('watch-bin', () => {
gulp.task('watch-lib', () => { gulp.task('watch-lib', () => {
return gulp.watch('lib/**/*.js', [ return gulp.watch('lib/**/*.js', [
'compile-lib', 'compile-lib',
'build-dev-client' 'build'
]) ])
}) })
@ -202,7 +199,7 @@ gulp.task('watch-server', () => {
gulp.task('watch-client', () => { gulp.task('watch-client', () => {
return gulp.watch('client/**/*.js', [ return gulp.watch('client/**/*.js', [
'compile-client', 'compile-client',
'build-dev-client' 'build'
]) ])
}) })
@ -225,7 +222,7 @@ gulp.task('default', [
gulp.task('release', (cb) => { gulp.task('release', (cb) => {
sequence('clean', [ sequence('clean', [
'compile', 'compile',
'build-release', 'build',
'copy', 'copy',
'test' 'test'
], 'clean-test', cb) ], 'clean-test', cb)