(argv?: string[] | string)
| 4 | * Create the cli and kick it off |
| 5 | */ |
| 6 | export async function run(argv?: string[] | string): Promise<GluegunToolbox> { |
| 7 | // create a CLI runtime |
| 8 | const gluegunCLI = build('gluegun') |
| 9 | .src(__dirname) |
| 10 | .help() |
| 11 | .version() |
| 12 | .defaultCommand({ |
| 13 | run: async (toolbox: GluegunToolbox) => { |
| 14 | const { print, meta } = toolbox |
| 15 | print.info(`Gluegun version ${meta.version()}`) |
| 16 | print.info(``) |
| 17 | print.info(` Type gluegun --help for more info`) |
| 18 | }, |
| 19 | }) |
| 20 | .exclude(['http', 'patching']) |
| 21 | .checkForUpdates(25) |
| 22 | .create() |
| 23 | |
| 24 | // and run it |
| 25 | const toolbox = await gluegunCLI.run(argv) |
| 26 | |
| 27 | // send it back (for testing, mostly) |
| 28 | return toolbox |
| 29 | } |
nothing calls this directly
no test coverage detected