forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ts
More file actions
30 lines (25 loc) · 1.26 KB
/
start.ts
File metadata and controls
30 lines (25 loc) · 1.26 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
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { EOL } from 'os';
import * as colors from 'colors';
import rushVersion from './rushVersion';
import RushCommandLineParser from './cli/actions/RushCommandLineParser';
/**
* Executes the Rush CLI. This is expected to be called by the @microsoft/rush package, which acts as a version manager
* for the Rush tool. The rush-lib API is exposed through the index.ts/js file.
*
* @param launcherVersion The version of the @microsoft/rush wrapper used to call invoke the CLI.
* @param isManaged True if the tool was invoked from within a project with a rush.json file, otherwise false. We
* consider a project without a rush.json to be "unmanaged" and we'll print that to the command line when
* the tool is executed. This is mainly used for debugging purposes.
*/
export function start(launcherVersion: string, isManaged: boolean): void {
console.log(
EOL +
colors.bold(`Rush Multi-Package Build Tool ${rushVersion}` + colors.yellow(isManaged ? '' : ' (unmanaged)')) +
colors.cyan(' - http://aka.ms/rush') +
EOL
);
const parser: RushCommandLineParser = new RushCommandLineParser();
parser.execute();
}