uniweb 0.2.37 → 0.2.39

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/README.md CHANGED
@@ -142,25 +142,13 @@ Projects use Vite 7 and Tailwind CSS v4 by default.
142
142
 
143
143
  ### Setting up pnpm
144
144
 
145
- Uniweb projects use pnpm for dependency management. The easiest way to get pnpm is via **Corepack**, which ships with Node.js.
146
-
147
- **Enable Corepack (one-time setup):**
145
+ We recommend pnpm for dependency management (npm also works). Install pnpm via npm:
148
146
 
149
147
  ```bash
150
- corepack enable
148
+ npm install -g pnpm
151
149
  ```
152
150
 
153
- > **Node 25+**: Corepack is no longer bundled. Install it first:
154
- > ```bash
155
- > npm i -g corepack && corepack enable
156
- > ```
157
-
158
- **Troubleshooting:**
159
-
160
- - If `pnpm` isn't found after enabling Corepack, you may have a global pnpm installation shadowing it. Remove it with `npm uninstall -g pnpm`.
161
- - Alternatively, install pnpm directly: `npm install -g pnpm`
162
-
163
- Once Corepack is enabled, running `pnpm install` in a Uniweb project will automatically use the correct pnpm version specified in `package.json`.
151
+ Or see the [official pnpm installation guide](https://pnpm.io/installation) for other options including Corepack, Homebrew, and more.
164
152
 
165
153
  ## Commands
166
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,7 +37,7 @@
37
37
  "js-yaml": "^4.1.0",
38
38
  "prompts": "^2.4.2",
39
39
  "tar": "^7.0.0",
40
- "@uniweb/build": "0.1.19",
40
+ "@uniweb/build": "0.1.20",
41
41
  "@uniweb/kit": "0.1.5",
42
42
  "@uniweb/runtime": "0.2.11",
43
43
  "@uniweb/core": "0.1.8"
@@ -9,9 +9,11 @@
9
9
 
10
10
  ### Section Ordering
11
11
 
12
- By default, sections are discovered from `.md` files and sorted by numeric prefix (`1-`, `2-`, `2.5-`).
12
+ By default, sections are discovered from `.md` files and sorted by numeric prefix (`1-`, `2-`, `3-`).
13
13
 
14
- For more control, use the `sections` property in `page.yml`:
14
+ **Decimal prefixes** allow inserting sections without renumbering: `2.5-` sorts between `2-` and `3-`.
15
+
16
+ For explicit control, use the `sections` property in `page.yml`:
15
17
 
16
18
  ```yaml
17
19
  title: My Page
@@ -21,9 +23,26 @@ sections:
21
23
  - pricing
22
24
  ```
23
25
 
24
- This approach makes reordering easy (just move lines) and allows temporarily removing sections by commenting them out.
26
+ This makes reordering easy (move lines) and allows commenting out sections temporarily.
25
27
 
26
28
  **Options:**
27
- - `sections: *` or omit — auto-discover and sort `.md` files (default)
28
- - `sections: [hero, features]` — explicit ordering, no numeric prefixes needed
29
- - `sections: []` or no `.md` files — pure route with no content sections
29
+ - `sections: *` or omit — auto-discover and sort `.md` files by prefix (default)
30
+ - `sections: [hero, features]` — explicit ordering, no prefixes needed
31
+ - `sections: []` — pure route with no content sections
32
+
33
+ ### Section Hierarchy (Subsections)
34
+
35
+ For parent-child relationships, use the explicit array with nesting:
36
+
37
+ ```yaml
38
+ sections:
39
+ - hero
40
+ - features:
41
+ - logocloud
42
+ - stats
43
+ - pricing
44
+ ```
45
+
46
+ This is clearer than prefix notation and easier to restructure.
47
+
48
+ **Advanced:** Comma prefixes (`1,1-`, `1,2-`) also denote hierarchy, but explicit arrays are recommended for readability.
@@ -122,11 +122,22 @@ sections:
122
122
  ```
123
123
 
124
124
  **Section ordering:**
125
- - Default: `.md` files discovered and sorted by numeric prefix (`1-`, `2-`, `2.5-`)
125
+ - Default: `.md` files discovered and sorted by numeric prefix (`1-`, `2-`, `3-`)
126
+ - Decimals to insert: `2.5-` sorts between `2-` and `3-` (no renumbering needed)
126
127
  - Explicit: Use `sections: [hero, features]` — no prefixes needed, easy reordering
127
- - Empty: `sections: []` or no `.md` files — pure route with no content
128
+ - Empty: `sections: []` — pure route with no content
128
129
  - Wildcard: `sections: *` — explicitly use default behavior
129
130
 
131
+ **Section hierarchy:** For subsections, use explicit nesting in `page.yml`:
132
+ ```yaml
133
+ sections:
134
+ - hero
135
+ - features:
136
+ - logocloud
137
+ - stats
138
+ ```
139
+ This is clearer than prefix notation (`1,1-`, `1,2-`) and easier to restructure.
140
+
130
141
  ## Component Development
131
142
 
132
143
  ### Props Interface
@@ -3,7 +3,6 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@10.0.0",
7
6
  "scripts": {
8
7
  "dev": "pnpm --filter site dev",
9
8
  "build": "pnpm --filter foundation build && pnpm --filter site build",
@@ -3,7 +3,6 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@10.0.0",
7
6
  "scripts": {
8
7
  "dev": "pnpm --filter main dev",
9
8
  "dev:all": "pnpm -r dev",
@@ -3,7 +3,6 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
- "packageManager": "pnpm@10.0.0",
7
6
  "scripts": {
8
7
  "dev": "pnpm --filter site dev",
9
8
  "build": "pnpm --filter foundation build && pnpm --filter site build",