create-ardo 2.0.1 → 2.1.1
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
CHANGED
|
@@ -91,6 +91,14 @@ async function main() {
|
|
|
91
91
|
name: "projectName",
|
|
92
92
|
message: reset("Project name:"),
|
|
93
93
|
initial: defaultTargetDir,
|
|
94
|
+
validate: (value) => {
|
|
95
|
+
const name = value.trim();
|
|
96
|
+
if (!name) return "Project name is required";
|
|
97
|
+
if (/^[.-]/.test(name)) return "Project name cannot start with a dot or hyphen";
|
|
98
|
+
if (!/^[a-z0-9-]+$/.test(name))
|
|
99
|
+
return "Project name may only contain lowercase letters, digits, and hyphens";
|
|
100
|
+
return true;
|
|
101
|
+
},
|
|
94
102
|
onState: (state) => {
|
|
95
103
|
targetDir = formatTargetDir(state.value) || defaultTargetDir;
|
|
96
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ardo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Scaffolding tool for Ardo documentation projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"kolorist": "^1.8.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^
|
|
36
|
+
"@types/node": "^25.2.2",
|
|
37
37
|
"@types/prompts": "^2.4.9",
|
|
38
38
|
"tsup": "^8.5.1",
|
|
39
39
|
"typescript": "^5.9.3"
|
|
@@ -19,13 +19,13 @@ jobs:
|
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
20
|
steps:
|
|
21
21
|
- name: Checkout
|
|
22
|
-
uses: actions/checkout@
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
23
|
|
|
24
24
|
- name: Setup pnpm
|
|
25
25
|
uses: pnpm/action-setup@v4
|
|
26
26
|
|
|
27
27
|
- name: Setup Node.js
|
|
28
|
-
uses: actions/setup-node@
|
|
28
|
+
uses: actions/setup-node@v6
|
|
29
29
|
with:
|
|
30
30
|
node-version: '22'
|
|
31
31
|
cache: 'pnpm'
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Links, Meta, Outlet, Scripts, ScrollRestoration, useLocation } from "react-router"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Layout as ArdoLayout,
|
|
4
|
+
Header,
|
|
5
|
+
Nav,
|
|
6
|
+
NavLink,
|
|
7
|
+
Sidebar,
|
|
8
|
+
SidebarGroup,
|
|
9
|
+
SidebarLink,
|
|
10
|
+
Footer,
|
|
11
|
+
} from "ardo/ui"
|
|
3
12
|
import { PressProvider } from "ardo/runtime"
|
|
4
13
|
import config from "virtual:ardo/config"
|
|
5
14
|
import sidebar from "virtual:ardo/sidebar"
|
|
@@ -29,7 +38,7 @@ export default function Root() {
|
|
|
29
38
|
|
|
30
39
|
return (
|
|
31
40
|
<PressProvider config={config} sidebar={sidebar}>
|
|
32
|
-
<
|
|
41
|
+
<ArdoLayout
|
|
33
42
|
className={isHomePage ? "ardo-layout ardo-home" : "ardo-layout"}
|
|
34
43
|
header={
|
|
35
44
|
<Header
|
|
@@ -50,10 +59,24 @@ export default function Root() {
|
|
|
50
59
|
</Sidebar>
|
|
51
60
|
)
|
|
52
61
|
}
|
|
53
|
-
footer={
|
|
62
|
+
footer={
|
|
63
|
+
<Footer
|
|
64
|
+
message={[
|
|
65
|
+
config.project?.homepage
|
|
66
|
+
? `<a href="${config.project.homepage}">${config.title}</a>`
|
|
67
|
+
: config.title,
|
|
68
|
+
"Built with <a href='https://github.com/sebastian-software/ardo'>Ardo</a>",
|
|
69
|
+
].join(" · ")}
|
|
70
|
+
copyright={
|
|
71
|
+
config.project?.author
|
|
72
|
+
? `Copyright © ${new Date().getFullYear()} ${config.project.author}`
|
|
73
|
+
: undefined
|
|
74
|
+
}
|
|
75
|
+
/>
|
|
76
|
+
}
|
|
54
77
|
>
|
|
55
78
|
<Outlet />
|
|
56
|
-
</
|
|
79
|
+
</ArdoLayout>
|
|
57
80
|
</PressProvider>
|
|
58
81
|
)
|
|
59
82
|
}
|