Version: 0.1.1
Last Updated: Unknown
Use this tempalate to used to generate a scaffold for tools using commander cli.
| Variable | Data Type | Info |
|---|---|---|
type | string | The name of the Lift folder type |
pkg | string | The name of the package |
1import prompts from "prompts";23import { opts } from "../../utils/opts";45export const <%= name %>Impl = (): void => {6 console.log('Running <%= name %>...')78 // TODO: add implementation910 console.log('Complete')11};
1import type { Command } from "commander";23import { <%= name %>Impl } from "./<%= name %>";45export const <%= name %> = (program: Command): void => {6 program7 .command("<%= name %>")8 .alias("<%= alias %>")9 .allowUnknownOption()10 <% options.forEach(option => { %>11 .option("<%= option.flag %>", "<%= option.description %>")12 <% }) %>13 .description("<%= description %>")14 .action(<%= name %>Impl);15};