forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
111 additions
and
120 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
24 changes: 13 additions & 11 deletions
24
apps/rush-lib/src/pluginFramework/PluginLoader/BuiltInPluginLoader.ts
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 |
---|---|---|
@@ -1,20 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
// See LICENSE in the project root for license information. | ||
|
||
import { Import } from '@rushstack/node-core-library'; | ||
import { IRushPluginConfigurationBase } from '../../api/RushPluginsConfiguration'; | ||
import { IPluginLoaderOptions, PluginLoaderBase } from './PluginLoaderBase'; | ||
|
||
import { PluginLoaderBase } from './PluginLoaderBase'; | ||
export interface IBuiltInPluginConfiguration extends IRushPluginConfigurationBase { | ||
pluginPackageFolder: string; | ||
} | ||
|
||
/** | ||
* Built-in plugin loader. | ||
* Loading those plugins are directly installed by Rush. | ||
* @remarks | ||
* Used to load plugins that are dependencies of Rush. | ||
*/ | ||
export class BuiltInPluginLoader extends PluginLoaderBase { | ||
protected override onGetPackageFolder(): string { | ||
const packageFolder: string = Import.resolvePackage({ | ||
baseFolderPath: __dirname, | ||
packageName: this._packageName | ||
}); | ||
return packageFolder; | ||
export class BuiltInPluginLoader extends PluginLoaderBase<IBuiltInPluginConfiguration> { | ||
public readonly packageFolder: string; | ||
|
||
public constructor(options: IPluginLoaderOptions<IBuiltInPluginConfiguration>) { | ||
super(options); | ||
this.packageFolder = options.pluginConfiguration.pluginPackageFolder; | ||
} | ||
} |
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
Oops, something went wrong.