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

Commit

Permalink
fix(build): every build should run clean sync and copy async.
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoms1 committed Dec 9, 2016
1 parent a909fc4 commit 6d4eb6e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ function validateRequiredFilesExist() {
}

function buildProject(context: BuildContext) {
var compilePromise = (context.runAot) ? ngc(context) : transpile(context);
// sync empty the www/build directory
clean(context);

buildId++;

const copyPromise = copy(context);
const compilePromise = (context.runAot) ? ngc(context) : transpile(context);

return compilePromise
.then(() => {
Expand All @@ -74,7 +80,8 @@ function buildProject(context: BuildContext) {

return Promise.all([
minPromise,
sassPromise
sassPromise,
copyPromise
]);
})
.then(() => {
Expand Down

0 comments on commit 6d4eb6e

Please sign in to comment.