uniweb 0.2.3 → 0.2.4

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
@@ -136,7 +136,17 @@ uniweb create [project-name] [options]
136
136
 
137
137
  | Option | Description |
138
138
  | ------------------- | ------------------------------------- |
139
- | `--template <type>` | Project template: `single` or `multi` |
139
+ | `--template <type>` | Project template (see below) |
140
+
141
+ **Template Sources:**
142
+
143
+ | Source | Example | Description |
144
+ | ------ | ------- | ----------- |
145
+ | Built-in | `single`, `multi` | Minimal starter templates |
146
+ | Official | `marketing` | Feature-rich showcase templates |
147
+ | npm | `@org/my-template` | Published npm packages |
148
+ | GitHub | `github:user/repo` | GitHub repositories |
149
+ | GitHub URL | `https://github.com/user/repo` | Full GitHub URLs |
140
150
 
141
151
  **Examples:**
142
152
 
@@ -152,6 +162,15 @@ uniweb create my-project --template single
152
162
 
153
163
  # Multi-site/foundation monorepo
154
164
  uniweb create my-workspace --template multi
165
+
166
+ # Official marketing template (landing pages, pricing, testimonials)
167
+ uniweb create my-site --template marketing
168
+
169
+ # From npm package
170
+ uniweb create my-site --template @myorg/starter-template
171
+
172
+ # From GitHub repository
173
+ uniweb create my-site --template github:myorg/uniweb-template
155
174
  ```
156
175
 
157
176
  ### `build`
@@ -187,7 +206,9 @@ uniweb build --platform vercel
187
206
 
188
207
  ## Project Templates
189
208
 
190
- ### Single (Default)
209
+ ### Built-in Templates
210
+
211
+ #### Single (Default)
191
212
 
192
213
  A minimal workspace with a site and foundation as sibling packages. This is the recommended starting point.
193
214
 
@@ -233,7 +254,7 @@ my-project/
233
254
  - **Zero extraction** — `foundation/` is already a complete, publishable package
234
255
  - **Scales naturally** — Rename to `sites/marketing/` and `foundations/marketing/` when needed
235
256
 
236
- ### Multi
257
+ #### Multi
237
258
 
238
259
  A monorepo for multi-site or multi-foundation development.
239
260
 
@@ -265,6 +286,44 @@ Use this when you need:
265
286
  - Multiple foundations for different purposes
266
287
  - A testing site for foundation development
267
288
 
289
+ ### Official Templates
290
+
291
+ Feature-rich templates that demonstrate what's possible with Uniweb. These include real components, sample content, and production-ready structure.
292
+
293
+ #### Marketing
294
+
295
+ A complete marketing site with landing page components:
296
+
297
+ ```bash
298
+ uniweb create my-site --template marketing
299
+ ```
300
+
301
+ **Includes:**
302
+ - **Hero** — Gradient/light/dark banner with CTAs
303
+ - **Features** — Grid layout with icons
304
+ - **Pricing** — Tiered pricing tables
305
+ - **Testimonials** — Customer quotes
306
+ - **CTA** — Call-to-action sections
307
+
308
+ Perfect for product launches, SaaS websites, and business landing pages.
309
+
310
+ ### External Templates
311
+
312
+ You can use templates from npm or GitHub:
313
+
314
+ ```bash
315
+ # npm package
316
+ uniweb create my-site --template @myorg/template-name
317
+
318
+ # GitHub repository
319
+ uniweb create my-site --template github:user/repo
320
+
321
+ # GitHub with specific branch/tag
322
+ uniweb create my-site --template github:user/repo#v1.0.0
323
+ ```
324
+
325
+ External templates must follow the same structure as official templates. See [`@uniweb/templates`](https://github.com/uniweb/templates) for the template format specification.
326
+
268
327
  ## Dependency Management
269
328
 
270
329
  Each package manages its own dependencies:
@@ -401,6 +460,7 @@ Pages can define data sources that auto-generate subroutes. A `/blog` page can h
401
460
 
402
461
  - [`@uniweb/build`](https://github.com/uniweb/build) — Foundation build tooling
403
462
  - [`@uniweb/runtime`](https://github.com/uniweb/runtime) — Runtime loader for sites
463
+ - [`@uniweb/templates`](https://github.com/uniweb/templates) — Official templates and template processing
404
464
 
405
465
  ## License
406
466
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -451,7 +451,7 @@ Learn more:
451
451
  // Update site to reference workspace foundation
452
452
  const sitePackageJson = join(projectDir, 'site/package.json')
453
453
  const sitePkg = JSON.parse(readFile(sitePackageJson))
454
- sitePkg.dependencies['foundation'] = 'workspace:*'
454
+ sitePkg.dependencies['foundation'] = 'file:../foundation'
455
455
  writeJSON(sitePackageJson, sitePkg)
456
456
 
457
457
  success(`Created project: ${projectName}`)
@@ -566,7 +566,7 @@ pnpm --filter foundations/marketing build
566
566
  // Update site to reference workspace foundation
567
567
  const sitePackageJson = join(projectDir, 'sites/marketing/package.json')
568
568
  const sitePkg = JSON.parse(readFile(sitePackageJson))
569
- sitePkg.dependencies['marketing'] = 'workspace:*'
569
+ sitePkg.dependencies['marketing'] = 'file:../../foundations/marketing'
570
570
  writeJSON(sitePackageJson, sitePkg)
571
571
 
572
572
  // Update site.yml to reference the marketing foundation