|
1 | 1 | import { Command } from "commander"; |
2 | 2 | import { resolve, dirname } from "path"; |
3 | 3 | import { select } from "@inquirer/prompts"; |
4 | | -import nodePlop, { PlopGenerator } from "node-plop"; |
| 4 | +import nodePlop, { type PlopGenerator } from "node-plop"; |
5 | 5 | import { fileURLToPath } from "url"; |
6 | 6 |
|
7 | 7 | import { onSuccessHandler, onFailureHandler, logger } from "./utils/logger.js"; |
8 | | -import { Answers, InitOptions, LoaderOptions, PluginOptions } from "./types"; |
| 8 | +import { type Answers, type InitOptions, type LoaderOptions, type PluginOptions } from "./types"; |
9 | 9 |
|
10 | 10 | const __dirname = dirname(fileURLToPath(import.meta.url)); |
11 | 11 |
|
@@ -63,7 +63,6 @@ const pluginGenerators: Record<string, PlopGenerator> = { |
63 | 63 | }; |
64 | 64 |
|
65 | 65 | program |
66 | | - .version("1.0.0", "-v, --version") |
67 | 66 | .usage("[command] [options]") |
68 | 67 | .helpOption("-h, --help", "Display help for command") |
69 | 68 | .description("A CLI tool to generate a Webpack project"); |
@@ -127,6 +126,7 @@ program |
127 | 126 | process.exit(2); |
128 | 127 | } |
129 | 128 | }); |
| 129 | + |
130 | 130 | program |
131 | 131 | .command("loader") |
132 | 132 | .aliases(["l", "ld"]) |
@@ -167,6 +167,7 @@ program |
167 | 167 | process.exit(2); |
168 | 168 | } |
169 | 169 | }); |
| 170 | + |
170 | 171 | program |
171 | 172 | .command("plugin") |
172 | 173 | .aliases(["p", "pl"]) |
|
0 commit comments