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

Commit 6d4eb6e

Browse files
committed
fix(build): every build should run clean sync and copy async.
1 parent a909fc4 commit 6d4eb6e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/build.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ function validateRequiredFilesExist() {
5959
}
6060

6161
function buildProject(context: BuildContext) {
62-
var compilePromise = (context.runAot) ? ngc(context) : transpile(context);
62+
// sync empty the www/build directory
63+
clean(context);
64+
65+
buildId++;
66+
67+
const copyPromise = copy(context);
68+
const compilePromise = (context.runAot) ? ngc(context) : transpile(context);
6369

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

7581
return Promise.all([
7682
minPromise,
77-
sassPromise
83+
sassPromise,
84+
copyPromise
7885
]);
7986
})
8087
.then(() => {

0 commit comments

Comments
 (0)