@yoamigo.com/cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import "dotenv/config";
|
|
5
5
|
import { Command as Command5 } from "commander";
|
|
6
|
+
import { createRequire } from "module";
|
|
6
7
|
|
|
7
8
|
// src/commands/login.ts
|
|
8
9
|
import { Command } from "commander";
|
|
@@ -355,8 +356,10 @@ async function collectFilesRecursive(dir) {
|
|
|
355
356
|
}
|
|
356
357
|
|
|
357
358
|
// src/index.ts
|
|
359
|
+
var require2 = createRequire(import.meta.url);
|
|
360
|
+
var pkg = require2("../package.json");
|
|
358
361
|
var program = new Command5();
|
|
359
|
-
program.name("yoamigo").description("CLI for creating and managing YoAmigo templates").version(
|
|
362
|
+
program.name("yoamigo").description("CLI for creating and managing YoAmigo templates").version(pkg.version, "-v, --version", "output the current version");
|
|
360
363
|
program.addCommand(loginCommand);
|
|
361
364
|
program.addCommand(initCommand);
|
|
362
365
|
program.addCommand(devCommand);
|