-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run clean task before build to remove previous build results #841
Conversation
c8a85f6
to
18b06d9
Compare
@@ -121,7 +127,9 @@ gulp.task('dev', ['dev:doc', 'dev:static', 'dev:applystyles', 'dev:generate'], ( | |||
gulp.watch('lib/styleguide.js', ['dev:generate']); | |||
}); | |||
|
|||
gulp.task('build', ['sass', 'js:app', 'js:vendor', 'html', 'assets']); | |||
gulp.task('build', ['clean-dist'], () => { | |||
gulp.start(['sass', 'js:app', 'js:vendor', 'html', 'assets']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gulp.start? That's new to me - and even Gulp API documentation does not have it documented. I believe run-sequence
is way to go instead (to ensure clean-dist
runs before others): https://www.npmjs.com/package/run-sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: gulpjs/gulp#426 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I just found the same comment. I´m not sure from where I found the start command but clearly it shouldn't be used.
@@ -121,7 +127,11 @@ gulp.task('dev', ['dev:doc', 'dev:static', 'dev:applystyles', 'dev:generate'], ( | |||
gulp.watch('lib/styleguide.js', ['dev:generate']); | |||
}); | |||
|
|||
gulp.task('build', ['sass', 'js:app', 'js:vendor', 'html', 'assets']); | |||
gulp.task('buildDist', ['sass', 'js:app', 'js:vendor', 'html', 'assets']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename this task into build:dist
. We use similar naming, with :
in other tasks.
Run clean task before build to remove previous build results
The problem #840 fixes would have been noticed a lot sooner if previous build results were cleared before the next build.