-
-
Save brandongregoryscott/af92aa668c87804cfc722409ecd462f8 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env node | |
// ----------------------------------------------------------------------------------------- | |
// #region Imports | |
// ----------------------------------------------------------------------------------------- | |
const program = require("commander"); | |
// #endregion Imports | |
// ----------------------------------------------------------------------------------------- | |
// #region Entrypoint / Command router | |
// ----------------------------------------------------------------------------------------- | |
// Description to display to the user when running the cli without arguments | |
program.description("Example cli written using ShellJS and Commander"); | |
// Registers the dotnet command via 'cli-dotnet.js' in the same folder. Commands must be created | |
// in a file prefixed with the name of this main file (ie, 'cli-<command>') | |
program.command( | |
"dotnet", | |
"Run various dotnet test runner commands for the project" | |
); | |
// Attempt to parse the arguments passed in and defer to subcommands, if any. | |
// If no arguments are passed in, this will automatically display the help information for the user. | |
program.parse(process.argv); | |
// #endregion Entrypoint / Command router |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment