2020-03-04 12:42:45 -05:00
|
|
|
/**
|
|
|
|
* @license
|
2020-05-19 15:08:49 -04:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2020-03-04 12:42:45 -05:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
2020-03-26 13:45:09 -04:00
|
|
|
import * as yargs from 'yargs';
|
2020-10-01 19:06:56 -04:00
|
|
|
|
|
|
|
import {buildCaretakerParser} from './caretaker/cli';
|
2020-03-26 13:45:09 -04:00
|
|
|
import {buildCommitMessageParser} from './commit-message/cli';
|
2020-04-20 16:00:10 -04:00
|
|
|
import {buildFormatParser} from './format/cli';
|
2020-10-01 19:06:56 -04:00
|
|
|
import {buildNgbotParser} from './ngbot/cli';
|
2020-05-05 18:37:31 -04:00
|
|
|
import {buildPrParser} from './pr/cli';
|
2020-10-01 19:06:56 -04:00
|
|
|
import {buildPullapproveParser} from './pullapprove/cli';
|
|
|
|
import {buildReleaseParser} from './release/cli';
|
|
|
|
import {tsCircularDependenciesBuilder} from './ts-circular-dependencies/index';
|
2020-08-26 14:38:19 -04:00
|
|
|
import {captureLogOutputForCommand} from './utils/console';
|
2020-03-04 17:37:21 -05:00
|
|
|
|
2020-03-26 13:45:09 -04:00
|
|
|
yargs.scriptName('ng-dev')
|
2020-08-26 14:38:19 -04:00
|
|
|
.middleware(captureLogOutputForCommand)
|
2020-03-26 13:45:09 -04:00
|
|
|
.demandCommand()
|
|
|
|
.recommendCommands()
|
|
|
|
.command('commit-message <command>', '', buildCommitMessageParser)
|
2020-04-20 16:00:10 -04:00
|
|
|
.command('format <command>', '', buildFormatParser)
|
2020-05-05 18:37:31 -04:00
|
|
|
.command('pr <command>', '', buildPrParser)
|
2020-04-20 17:44:25 -04:00
|
|
|
.command('pullapprove <command>', '', buildPullapproveParser)
|
|
|
|
.command('release <command>', '', buildReleaseParser)
|
|
|
|
.command('ts-circular-deps <command>', '', tsCircularDependenciesBuilder)
|
2020-08-26 16:49:43 -04:00
|
|
|
.command('caretaker <command>', '', buildCaretakerParser)
|
2020-09-30 17:32:19 -04:00
|
|
|
.command('ngbot <command>', false, buildNgbotParser)
|
2020-03-26 13:45:09 -04:00
|
|
|
.wrap(120)
|
|
|
|
.strict()
|
|
|
|
.parse();
|