@matchkit.io/cli 0.1.5 → 0.1.6

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/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
+ import { readFileSync } from "node:fs";
4
+ import { fileURLToPath } from "node:url";
5
+ import { dirname, join } from "node:path";
3
6
  import { initCommand } from "./commands/init.js";
4
7
  import { addCommand } from "./commands/add.js";
5
8
  import { listCommand } from "./commands/list.js";
@@ -7,11 +10,13 @@ import { diffCommand } from "./commands/diff.js";
7
10
  import { loginCommand } from "./commands/login.js";
8
11
  import { pullCommand } from "./commands/pull.js";
9
12
  import { statusCommand } from "./commands/status.js";
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
10
15
  const program = new Command();
11
16
  program
12
17
  .name("matchkit")
13
18
  .description("MatchKit — style-agnostic design system CLI")
14
- .version("0.1.4");
19
+ .version(pkg.version);
15
20
  program
16
21
  .command("init")
17
22
  .description("Initialize a MatchKit design system in your project")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchkit.io/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "CLI for MatchKit design system skills. Init projects, add components, manage your design system.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",