Skip to content

Commit 6a2ab67

Browse files
mmalerbahansl
authored andcommitted
feat(@angular-devkit/schematics): allow package name to be specified for install task
1 parent 61b7d72 commit 6a2ab67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/angular_devkit/schematics/tasks/node-package/install-task.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { NodePackageName, NodePackageTaskOptions } from './options';
1010

1111
export class NodePackageInstallTaskOptions {
1212
packageManager: string;
13+
packageName: string;
1314
workingDirectory: string;
1415
quiet: boolean;
1516
}
@@ -18,6 +19,7 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator<NodePa
1819
quiet = true;
1920
workingDirectory?: string;
2021
packageManager?: string;
22+
packageName?: string;
2123

2224
constructor(workingDirectory?: string);
2325
constructor(options: Partial<NodePackageInstallTaskOptions>);
@@ -34,6 +36,9 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator<NodePa
3436
if (options.packageManager != undefined) {
3537
this.packageManager = options.packageManager;
3638
}
39+
if (options.packageName != undefined) {
40+
this.packageName = options.packageName;
41+
}
3742
}
3843
}
3944

@@ -45,6 +50,7 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator<NodePa
4550
quiet: this.quiet,
4651
workingDirectory: this.workingDirectory,
4752
packageManager: this.packageManager,
53+
packageName: this.packageName,
4854
},
4955
};
5056
}

0 commit comments

Comments
 (0)