pointfree-docs 0.2.3 → 0.2.4
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/cli.js +4 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* A CLI for searching and browsing Point-Free library documentation.
|
|
6
6
|
*/
|
|
7
7
|
import { Command } from "commander";
|
|
8
|
+
import { createRequire } from "node:module";
|
|
8
9
|
import { initCommand } from "./commands/init.js";
|
|
9
10
|
import { updateCommand } from "./commands/update.js";
|
|
10
11
|
import { searchCommand } from "./commands/search.js";
|
|
11
12
|
import { getCommand } from "./commands/get.js";
|
|
12
13
|
import { listCommand } from "./commands/list.js";
|
|
13
14
|
import { statsCommand } from "./commands/stats.js";
|
|
15
|
+
const require = createRequire(import.meta.url);
|
|
16
|
+
const packageMetadata = require("../package.json");
|
|
14
17
|
const program = new Command();
|
|
15
18
|
program
|
|
16
19
|
.name("pf-docs")
|
|
@@ -28,7 +31,7 @@ Path format: <library>/<Articles|Tutorials|Extensions>/<Name>
|
|
|
28
31
|
e.g. tca/Articles/TestingTCA, sharing/Articles/SharingState
|
|
29
32
|
|
|
30
33
|
All commands support --json for machine-readable output.`)
|
|
31
|
-
.version(
|
|
34
|
+
.version(packageMetadata.version);
|
|
32
35
|
program
|
|
33
36
|
.command("init")
|
|
34
37
|
.description("Initialize and download documentation for specified libraries")
|