forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@angular/cli): add flag to not delete output path
Fix angular#5925 Fix angular#6193
- Loading branch information
1 parent
ccd1b3b
commit c717fce
Showing
6 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {ng} from '../../utils/process'; | ||
import {expectToFail} from '../../utils/utils'; | ||
import {deleteFile, expectFileToExist} from '../../utils/fs'; | ||
import {getGlobalVariable} from '../../utils/env'; | ||
|
||
export default function() { | ||
// Skip this in ejected tests. | ||
if (getGlobalVariable('argv').eject) { | ||
return Promise.resolve(); | ||
} | ||
|
||
return ng('build') | ||
// This is supposed to fail since there's a missing file | ||
.then(() => deleteFile('src/app/app.component.ts')) | ||
// The build fails but we don't delete the output of the previous build. | ||
.then(() => expectToFail(() => ng('build', '--no-delete-output-path'))) | ||
.then(() => expectFileToExist('dist')) | ||
// By default, output path is always cleared. | ||
.then(() => expectToFail(() => ng('build'))) | ||
.then(() => expectToFail(() => expectFileToExist('dist'))); | ||
} |
This file was deleted.
Oops, something went wrong.