-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(config): allow minimal config for build/serve (#3835)
This PR fixes a lot of errors that would show up when `angular-cli.json` was missing some entries. A config as small as the following now works for `ng build/serve`: ``` { "apps": [ { "root": "src", "main": "main.ts" } ] } ``` In future PRs we should verify the rest of the commands work correctly with minimal configs.
- Loading branch information
1 parent
e2b051f
commit f616158
Showing
6 changed files
with
57 additions
and
30 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
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,14 @@ | ||
import { writeFile } from '../../utils/fs'; | ||
import { ng } from '../../utils/process'; | ||
|
||
|
||
export default function () { | ||
return Promise.resolve() | ||
.then(() => writeFile('angular-cli.json', JSON.stringify({ | ||
apps: [{ | ||
root: 'src', | ||
main: 'main.ts' | ||
}] | ||
}))) | ||
.then(() => ng('build')); | ||
} |