Alan Agius 7975845831 refactor(@angular-devkit/schematics): deprecate NodePackageLinkTask
DEPRECATED: `NodePackageLinkTask` in `@angular-devkit/schematics`. A custom task should be created instead.
2024-03-14 16:04:20 +01:00

35 lines
917 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { NodePackageName, NodePackageTaskOptions } from './options';
/**
* @deprecated since version 18. Create a custom task if required.
*/
export class NodePackageLinkTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
quiet = true;
constructor(
public packageName?: string,
public workingDirectory?: string,
) {}
toConfiguration(): TaskConfiguration<NodePackageTaskOptions> {
return {
name: NodePackageName,
options: {
command: 'link',
quiet: this.quiet,
workingDirectory: this.workingDirectory,
packageName: this.packageName,
},
};
}
}