Skip to content

Commit 729d407

Browse files
committed
fix(@angular/cli): save package on ng add
Before it was the job of the ng-add schematic to save the package. Now we do it automatically. This is more expected (and works without ng-add schematics if the user want to use "ng add moment" for example).
1 parent 05fd09d commit 729d407

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@angular/cli/commands/add.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class AddCommand extends SchematicCommand {
6767
this.logger,
6868
packageManager,
6969
this.project.root,
70-
false);
70+
);
7171

7272
// Reparse the options with the new schematic accessible.
7373
options = await this._parseSchematicOptions(collectionName);

packages/@angular/cli/tasks/npm-install.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ export type NpmInstall = (packageName: string,
99
logger: logging.Logger,
1010
packageManager: string,
1111
projectRoot: string,
12-
save: boolean) => void;
12+
save?: boolean) => void;
1313

1414
export default async function (packageName: string,
1515
logger: logging.Logger,
1616
packageManager: string,
1717
projectRoot: string,
18-
save: boolean) {
18+
save = true) {
1919
if (packageManager === 'default') {
2020
packageManager = 'npm';
2121
}

0 commit comments

Comments
 (0)