Repository navigation
Expand file tree
/
Copy pathstart-dev.ts
More file actions
50 lines (43 loc) · 1.74 KB
/
Copy pathstart-dev.ts
File metadata and controls
50 lines (43 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
// This file is used during development to load the built-in plugins and to bypass
// some other checks
import * as rushLib from '@microsoft/rush-lib';
import { PackageJsonLookup, Import } from '@rushstack/node-core-library';
import { launchRushFrontendAsync } from './RushFrontend';
const builtInPluginConfigurations: rushLib._IBuiltInPluginConfiguration[] = [];
function includePlugin(pluginName: string, pluginPackageName?: string): void {
if (!pluginPackageName) {
pluginPackageName = `@rushstack/${pluginName}`;
}
builtInPluginConfigurations.push({
packageName: pluginPackageName,
pluginName: pluginName,
pluginPackageFolder: Import.resolvePackage({
packageName: pluginPackageName,
baseFolderPath: __dirname,
useNodeJSResolver: true
})
});
}
includePlugin('rush-amazon-s3-build-cache-plugin');
includePlugin('rush-azure-storage-build-cache-plugin');
includePlugin('rush-http-build-cache-plugin');
includePlugin('rush-serve-plugin');
// Including this here so that developers can reuse it without installing the plugin a second time
includePlugin('rush-azure-interactive-auth-plugin', '@rushstack/rush-azure-storage-build-cache-plugin');
const currentPackageVersion: string = PackageJsonLookup.loadOwnPackageJson(__dirname).version;
launchRushFrontendAsync({
currentPackageVersion,
rushVersionToLoad: undefined,
configuration: undefined,
launchOptions: {
isManaged: false,
alreadyReportedNodeTooNewError: false,
builtInPluginConfigurations
},
currentRushLib: rushLib
}).catch((error: Error) => {
process.exitCode = 1;
console.error(error);
});