v-uixy 1.1.1 → 1.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.
Files changed (2) hide show
  1. package/bin/v-uixy.js +10 -1
  2. package/package.json +1 -1
package/bin/v-uixy.js CHANGED
@@ -1,17 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { createRequire } from "module";
3
4
  import { Command } from "commander";
4
5
  import add from "../commands/add.js";
5
6
  import remove from "../commands/remove.js";
6
7
  import list from "../commands/list.js";
7
8
  import init from "../commands/init.js";
8
9
 
10
+ const require = createRequire(import.meta.url);
11
+
12
+ let pkgVersion = "0.0.0";
13
+ try {
14
+ const pkg = require("../package.json");
15
+ pkgVersion = pkg.version || pkgVersion;
16
+ } catch {}
17
+
9
18
  const program = new Command();
10
19
 
11
20
  program
12
21
  .name("v-uixy")
13
22
  .description("A UI components CLI for Nuxt + Tailwind")
14
- .version("1.1.0");
23
+ .version(pkgVersion);
15
24
 
16
25
  program.command("add <component>").description("Add a component").action(add);
17
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-uixy",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Alan Haber",