@fumadocs/cli 1.0.2 → 1.1.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.
- package/dist/index.js +18 -35
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -343,7 +343,7 @@ async function runTree(args) {
|
|
|
343
343
|
// package.json
|
|
344
344
|
var package_default = {
|
|
345
345
|
name: "@fumadocs/cli",
|
|
346
|
-
version: "1.0
|
|
346
|
+
version: "1.1.0",
|
|
347
347
|
description: "The CLI tool for Fumadocs",
|
|
348
348
|
keywords: [
|
|
349
349
|
"NextJs",
|
|
@@ -377,17 +377,17 @@ var package_default = {
|
|
|
377
377
|
},
|
|
378
378
|
dependencies: {
|
|
379
379
|
"@clack/prompts": "^0.11.0",
|
|
380
|
-
commander: "^14.0.
|
|
381
|
-
"package-manager-detector": "^1.
|
|
380
|
+
commander: "^14.0.2",
|
|
381
|
+
"package-manager-detector": "^1.5.0",
|
|
382
382
|
picocolors: "^1.1.1",
|
|
383
|
-
tinyexec: "^1.0.
|
|
384
|
-
"ts-morph": "^27.0.
|
|
385
|
-
zod: "^4.1.
|
|
383
|
+
tinyexec: "^1.0.2",
|
|
384
|
+
"ts-morph": "^27.0.2",
|
|
385
|
+
zod: "^4.1.12"
|
|
386
386
|
},
|
|
387
387
|
devDependencies: {
|
|
388
|
-
"@types/node": "24.
|
|
388
|
+
"@types/node": "24.10.1",
|
|
389
389
|
"eslint-config-custom": "workspace:*",
|
|
390
|
-
shadcn: "3.
|
|
390
|
+
shadcn: "3.5.0",
|
|
391
391
|
tsconfig: "workspace:*"
|
|
392
392
|
},
|
|
393
393
|
publishConfig: {
|
|
@@ -396,15 +396,7 @@ var package_default = {
|
|
|
396
396
|
};
|
|
397
397
|
|
|
398
398
|
// src/commands/customise.ts
|
|
399
|
-
import {
|
|
400
|
-
cancel,
|
|
401
|
-
confirm as confirm3,
|
|
402
|
-
group,
|
|
403
|
-
intro as intro2,
|
|
404
|
-
log as log3,
|
|
405
|
-
outro as outro3,
|
|
406
|
-
select
|
|
407
|
-
} from "@clack/prompts";
|
|
399
|
+
import { cancel, group, intro as intro2, log as log3, outro as outro3, select } from "@clack/prompts";
|
|
408
400
|
import picocolors2 from "picocolors";
|
|
409
401
|
|
|
410
402
|
// src/commands/add.ts
|
|
@@ -581,13 +573,6 @@ async function customise(resolver, config) {
|
|
|
581
573
|
}
|
|
582
574
|
]
|
|
583
575
|
});
|
|
584
|
-
},
|
|
585
|
-
page: async (v) => {
|
|
586
|
-
if (v.results.target !== "docs" || v.results.mode === "minimal")
|
|
587
|
-
return false;
|
|
588
|
-
return confirm3({
|
|
589
|
-
message: "Do you want to customise the page component too?"
|
|
590
|
-
});
|
|
591
576
|
}
|
|
592
577
|
},
|
|
593
578
|
{
|
|
@@ -599,26 +584,24 @@ async function customise(resolver, config) {
|
|
|
599
584
|
);
|
|
600
585
|
if (result.target === "docs") {
|
|
601
586
|
const targets = [];
|
|
602
|
-
let pageAdded = false;
|
|
603
587
|
if (result.mode === "minimal") {
|
|
604
588
|
targets.push("layouts/docs-min");
|
|
605
|
-
pageAdded = true;
|
|
606
589
|
} else {
|
|
607
|
-
if (result.page) {
|
|
608
|
-
targets.push("layouts/page");
|
|
609
|
-
pageAdded = true;
|
|
610
|
-
}
|
|
611
590
|
targets.push(
|
|
612
591
|
result.mode === "full-default" ? "layouts/docs" : "layouts/notebook"
|
|
613
592
|
);
|
|
614
593
|
}
|
|
615
594
|
await install(targets, installer);
|
|
616
|
-
const maps = [
|
|
617
|
-
["fumadocs-ui/layouts/
|
|
595
|
+
const maps = result.mode === "full-notebook" ? [
|
|
596
|
+
["fumadocs-ui/layouts/notebook", "@/components/layout/notebook"],
|
|
597
|
+
[
|
|
598
|
+
"fumadocs-ui/layouts/notebook/page",
|
|
599
|
+
"@/components/layout/notebook/page"
|
|
600
|
+
]
|
|
601
|
+
] : [
|
|
602
|
+
["fumadocs-ui/layouts/docs", "@/components/layout/docs"],
|
|
603
|
+
["fumadocs-ui/layouts/docs/page", "@/components/layout/docs/page"]
|
|
618
604
|
];
|
|
619
|
-
if (pageAdded) {
|
|
620
|
-
maps.push(["fumadocs-ui/page", "@/components/layout/page"]);
|
|
621
|
-
}
|
|
622
605
|
printNext(...maps);
|
|
623
606
|
}
|
|
624
607
|
if (result.target === "home") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fumadocs/cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The CLI tool for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@clack/prompts": "^0.11.0",
|
|
30
|
-
"commander": "^14.0.
|
|
31
|
-
"package-manager-detector": "^1.
|
|
30
|
+
"commander": "^14.0.2",
|
|
31
|
+
"package-manager-detector": "^1.5.0",
|
|
32
32
|
"picocolors": "^1.1.1",
|
|
33
|
-
"tinyexec": "^1.0.
|
|
34
|
-
"ts-morph": "^27.0.
|
|
35
|
-
"zod": "^4.1.
|
|
33
|
+
"tinyexec": "^1.0.2",
|
|
34
|
+
"ts-morph": "^27.0.2",
|
|
35
|
+
"zod": "^4.1.12"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "24.
|
|
39
|
-
"shadcn": "3.
|
|
38
|
+
"@types/node": "24.10.1",
|
|
39
|
+
"shadcn": "3.5.0",
|
|
40
40
|
"eslint-config-custom": "0.0.0",
|
|
41
41
|
"tsconfig": "0.0.0"
|
|
42
42
|
},
|