Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
fix(coverage): fixed coverage publishing failure due to build phase d…
Browse files Browse the repository at this point in the history
…eleting the reports
  • Loading branch information
zakhenry committed May 20, 2016
1 parent ce6e18e commit d980754
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ let entryPoint = './localhost.js';
/**
* Remove build directory.
*/
gulp.task('clean', function () {
return gulp.src(['build', 'coverage'], {read: false})
gulp.task('clean-build', function () {
return gulp.src(['build'], {read: false})
.pipe(rimraf())
});

gulp.task('clean-coverage', function () {
return gulp.src(['coverage'], {read: false})
.pipe(rimraf())
});

Expand Down Expand Up @@ -77,7 +82,7 @@ gulp.task('format', (cb) => {
/**
* Compile TypeScript sources and create sourcemaps in build directory.
*/
gulp.task('compile', ['clean'], () => {
gulp.task('compile', ['clean-build'], () => {
let tsResult = gulp.src(sourceFiles.concat(testFiles))
.pipe(sourcemaps.init())
.pipe(tsc(tsProject));
Expand All @@ -102,7 +107,7 @@ gulp.task('build', ['compile'], () => {
console.log('Building the project ...')
});

gulp.task('pre-test', function () {
gulp.task('pre-test', ['clean-coverage'], () => {
return gulp.src(['build/api/**/*.js'])
// Covering files
.pipe(istanbul())
Expand Down

0 comments on commit d980754

Please sign in to comment.