2020-03-26 17:45:09 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 19:08:49 +00:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2020-03-26 17:45:09 +00: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
|
|
|
|
|
*/
|
|
|
|
|
import * as yargs from 'yargs';
|
2020-05-20 21:22:29 +00:00
|
|
|
|
2020-09-14 20:21:31 +00:00
|
|
|
import {RestoreCommitMessageModule} from './restore-commit-message/cli';
|
|
|
|
|
import {ValidateFileModule} from './validate-file/cli';
|
|
|
|
|
import {ValidateRangeModule} from './validate-range/cli';
|
2020-03-26 17:45:09 +00:00
|
|
|
|
|
|
|
|
/** Build the parser for the commit-message commands. */
|
|
|
|
|
export function buildCommitMessageParser(localYargs: yargs.Argv) {
|
2020-03-20 19:24:12 +00:00
|
|
|
return localYargs.help()
|
|
|
|
|
.strict()
|
2020-09-14 20:21:31 +00:00
|
|
|
.command(RestoreCommitMessageModule)
|
|
|
|
|
.command(ValidateFileModule)
|
|
|
|
|
.command(ValidateRangeModule);
|
2020-03-26 17:45:09 +00:00
|
|
|
}
|