docs-i18n 0.4.1 → 0.5.0

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/cli.js +7 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4,7 +4,14 @@ import {
4
4
  } from "./chunk-SKKZIV3L.js";
5
5
 
6
6
  // src/cli.ts
7
+ import { createRequire } from "module";
7
8
  var args = process.argv.slice(2);
9
+ if (args[0] === "--version" || args[0] === "-v") {
10
+ const require2 = createRequire(import.meta.url);
11
+ const pkg = require2("../package.json");
12
+ console.log(pkg.version);
13
+ process.exit(0);
14
+ }
8
15
  var command = args[0];
9
16
  function getOpt(name, def = "") {
10
17
  const idx = args.indexOf(`--${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docs-i18n",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Universal documentation translation engine — parse, translate, cache, assemble, manage.",
5
5
  "type": "module",
6
6
  "bin": {