uniweb 0.7.7 → 0.7.8

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
@@ -10,8 +10,6 @@ Create well-structured Vite + React projects with file-based routing, localizati
10
10
  npm create uniweb
11
11
  ```
12
12
 
13
- > **pnpm ready** — `pnpm create uniweb` works out of the box. Projects include both `pnpm-workspace.yaml` and npm workspaces.
14
-
15
13
  The interactive prompt asks for a project name and template. Pick one, then:
16
14
 
17
15
  ```bash
@@ -22,6 +20,8 @@ npm run dev
22
20
 
23
21
  Edit files in `site/pages/` and `foundation/src/sections/` to see changes instantly.
24
22
 
23
+ > **pnpm ready** — `pnpm create uniweb` works out of the box. Projects include both `pnpm-workspace.yaml` and npm workspaces.
24
+
25
25
  ### Templates
26
26
 
27
27
  | Template | Description |
@@ -44,6 +44,12 @@ You can also skip the interactive prompt with `--template`:
44
44
  npm create uniweb my-site -- --template docs
45
45
  ```
46
46
 
47
+ or
48
+
49
+ ```bash
50
+ pnpm create uniweb my-site --template docs
51
+ ```
52
+
47
53
  ### Development Commands
48
54
 
49
55
  Run these from the **project root**:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,8 +41,8 @@
41
41
  "js-yaml": "^4.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
- "@uniweb/kit": "0.6.1",
45
44
  "@uniweb/build": "0.7.5",
45
+ "@uniweb/kit": "0.6.1",
46
46
  "@uniweb/runtime": "0.6.1",
47
47
  "@uniweb/core": "0.5.1"
48
48
  }
@@ -178,7 +178,11 @@ async function addFoundation(rootDir, projectName, opts, pm = 'pnpm') {
178
178
  process.exit(0)
179
179
  },
180
180
  })
181
- name = response.name
181
+ // Only set name if user chose something other than the default —
182
+ // null name tells resolveFoundationTarget to use default placement (./foundation/)
183
+ if (!hasDefault || response.name !== 'foundation') {
184
+ name = response.name
185
+ }
182
186
  }
183
187
 
184
188
  const target = await resolveFoundationTarget(rootDir, name, opts)
@@ -242,7 +246,11 @@ async function addSite(rootDir, projectName, opts, pm = 'pnpm') {
242
246
  process.exit(0)
243
247
  },
244
248
  })
245
- name = response.name
249
+ // Only set name if user chose something other than the default —
250
+ // null name tells resolveSiteTarget to use default placement (./site/)
251
+ if (!hasDefault || response.name !== 'site') {
252
+ name = response.name
253
+ }
246
254
  }
247
255
 
248
256
  const target = await resolveSiteTarget(rootDir, name, opts)
@@ -60,11 +60,12 @@ export async function addWorkspaceGlob(rootDir, glob) {
60
60
 
61
61
  // Sync workspaces array in package.json (for npm compatibility)
62
62
  const pkg = await readRootPackageJson(rootDir)
63
- if (pkg.workspaces) {
64
- if (!pkg.workspaces.includes(glob)) {
65
- pkg.workspaces.push(glob)
66
- await writeRootPackageJson(rootDir, pkg)
67
- }
63
+ if (!pkg.workspaces) {
64
+ pkg.workspaces = []
65
+ }
66
+ if (!pkg.workspaces.includes(glob)) {
67
+ pkg.workspaces.push(glob)
68
+ await writeRootPackageJson(rootDir, pkg)
68
69
  }
69
70
  }
70
71