Skip to content
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

Merged
merged 3 commits into from
Nov 24, 2015

Conversation

simkall
Copy link
Contributor

@simkall simkall commented Nov 24, 2015

The problem #840 fixes would have been noticed a lot sooner if previous build results were cleared before the next build.

@simkall simkall force-pushed the add-clean-task-to-build-process branch from c8a85f6 to 18b06d9 Compare November 24, 2015 10:06
@@ -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']);
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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']);
Copy link
Contributor

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.

varya added a commit that referenced this pull request Nov 24, 2015
Run clean task before build to remove previous build results
@varya varya merged commit 10d335a into SC5:master Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants