uniweb 0.7.8 → 0.7.10
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 +8 -12
- package/package.json +3 -3
- package/src/commands/add.js +5 -13
- package/src/index.js +0 -1
package/README.md
CHANGED
|
@@ -38,13 +38,7 @@ Edit files in `site/pages/` and `foundation/src/sections/` to see changes instan
|
|
|
38
38
|
|
|
39
39
|
**See them live:** [View all template demos](https://uniweb.github.io/templates/)
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npm create uniweb my-site -- --template docs
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
or
|
|
41
|
+
Or skip the interactive prompt:
|
|
48
42
|
|
|
49
43
|
```bash
|
|
50
44
|
pnpm create uniweb my-site --template docs
|
|
@@ -256,16 +250,17 @@ npx uniweb add site main --from marketing --foundation marketing
|
|
|
256
250
|
|
|
257
251
|
The workspace grows organically. `add` handles placement, wires dependencies, updates workspace globs, and generates root scripts. Use `--path` to override default placement, or `--project` for co-located layouts (e.g., `marketing/foundation/` + `marketing/site/`).
|
|
258
252
|
|
|
253
|
+
> `npx uniweb` works before and after install. Once dependencies are installed, you can also use `pnpm uniweb` directly since `uniweb` is a project dependency.
|
|
254
|
+
|
|
259
255
|
**Or start blank and build up:**
|
|
260
256
|
|
|
261
257
|
```bash
|
|
262
|
-
|
|
258
|
+
pnpm create uniweb acme --template blank
|
|
263
259
|
cd acme
|
|
264
|
-
npm install
|
|
265
260
|
npx uniweb add foundation
|
|
266
261
|
npx uniweb add site
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
pnpm install
|
|
263
|
+
pnpm dev
|
|
269
264
|
```
|
|
270
265
|
|
|
271
266
|
## The Bigger Picture
|
|
@@ -364,8 +359,9 @@ packages:
|
|
|
364
359
|
- site
|
|
365
360
|
```
|
|
366
361
|
|
|
362
|
+
In `package.json` (for npm compatibility):
|
|
363
|
+
|
|
367
364
|
```json
|
|
368
|
-
// package.json (for npm compatibility)
|
|
369
365
|
{
|
|
370
366
|
"workspaces": ["foundation", "site"]
|
|
371
367
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
-
"@uniweb/build": "0.7.
|
|
45
|
-
"@uniweb/kit": "0.6.1",
|
|
44
|
+
"@uniweb/build": "0.7.6",
|
|
46
45
|
"@uniweb/runtime": "0.6.1",
|
|
46
|
+
"@uniweb/kit": "0.6.1",
|
|
47
47
|
"@uniweb/core": "0.5.1"
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/commands/add.js
CHANGED
|
@@ -316,6 +316,11 @@ async function addSite(rootDir, projectName, opts, pm = 'pnpm') {
|
|
|
316
316
|
}
|
|
317
317
|
log('')
|
|
318
318
|
log(`Next: ${colors.cyan}${installCmd(pm)} && ${filterCmd(pm, siteName, 'dev')}${colors.reset}`)
|
|
319
|
+
if (!opts.from) {
|
|
320
|
+
log('')
|
|
321
|
+
log(`${colors.dim}To add your first page, create ${target}/pages/home/page.yml and a .md file.${colors.reset}`)
|
|
322
|
+
log(`${colors.dim}Or use --from to start with template content: uniweb add site --from starter${colors.reset}`)
|
|
323
|
+
}
|
|
319
324
|
}
|
|
320
325
|
|
|
321
326
|
/**
|
|
@@ -475,19 +480,6 @@ async function resolveFoundation(rootDir, foundationFlag) {
|
|
|
475
480
|
}
|
|
476
481
|
|
|
477
482
|
if (foundations.length === 0) {
|
|
478
|
-
const response = await prompts({
|
|
479
|
-
type: 'select',
|
|
480
|
-
name: 'choice',
|
|
481
|
-
message: 'No foundations found. Proceed without one?',
|
|
482
|
-
choices: [
|
|
483
|
-
{ title: 'None', value: 'none', description: 'Proceed without a foundation' },
|
|
484
|
-
],
|
|
485
|
-
}, {
|
|
486
|
-
onCancel: () => {
|
|
487
|
-
log('\nCancelled.')
|
|
488
|
-
process.exit(0)
|
|
489
|
-
},
|
|
490
|
-
})
|
|
491
483
|
return null
|
|
492
484
|
}
|
|
493
485
|
|
package/src/index.js
CHANGED
|
@@ -501,7 +501,6 @@ async function main() {
|
|
|
501
501
|
if (templateType === 'blank') {
|
|
502
502
|
log(`Next steps:\n`)
|
|
503
503
|
log(` ${colors.cyan}cd ${projectName}${colors.reset}`)
|
|
504
|
-
log(` ${colors.cyan}${installCmd(pm)}${colors.reset}`)
|
|
505
504
|
log(` ${colors.cyan}npx uniweb add foundation${colors.reset}`)
|
|
506
505
|
log(` ${colors.cyan}npx uniweb add site${colors.reset}`)
|
|
507
506
|
log(` ${colors.cyan}${installCmd(pm)}${colors.reset}`)
|