uniweb 0.2.27 → 0.2.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.27",
3
+ "version": "0.2.29",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,9 +36,9 @@
36
36
  "js-yaml": "^4.1.0",
37
37
  "prompts": "^2.4.2",
38
38
  "tar": "^7.0.0",
39
+ "@uniweb/build": "0.1.13",
39
40
  "@uniweb/core": "0.1.6",
40
- "@uniweb/runtime": "0.2.5",
41
- "@uniweb/build": "0.1.11",
42
- "@uniweb/kit": "0.1.4"
41
+ "@uniweb/kit": "0.1.4",
42
+ "@uniweb/runtime": "0.2.6"
43
43
  }
44
44
  }
package/src/versions.js CHANGED
@@ -67,7 +67,7 @@ export function getResolvedVersions() {
67
67
  // When publishing with pnpm, workspace:* gets resolved to actual versions.
68
68
  // Fallbacks are only used during local development.
69
69
  resolvedVersions = {
70
- '@uniweb/build': resolveVersionSpec(deps['@uniweb/build'], '^0.1.11'),
70
+ '@uniweb/build': resolveVersionSpec(deps['@uniweb/build'], '^0.1.12'),
71
71
  '@uniweb/core': resolveVersionSpec(deps['@uniweb/core'], '^0.1.6'),
72
72
  '@uniweb/kit': resolveVersionSpec(deps['@uniweb/kit'], '^0.1.4'),
73
73
  '@uniweb/runtime': resolveVersionSpec(deps['@uniweb/runtime'], '^0.2.3'),
@@ -34,7 +34,7 @@ cd site && pnpm build
34
34
 
35
35
  **Site:**
36
36
  - `site/vite.config.js` - 3-line config using `defineSiteConfig()` from `@uniweb/build/site`
37
- - `site/main.js` - 1-line entry: `import 'virtual:uniweb-site-entry'`
37
+ - `site/main.js` - Entry point using `start()` from `@uniweb/runtime`
38
38
  - `site/site.yml` - Site configuration (foundation path, title, i18n)
39
39
  - `site/pages/` - Content pages (file-based routing)
40
40
 
@@ -73,7 +73,7 @@ pnpm build:all
73
73
 
74
74
  **Sites:**
75
75
  - `sites/*/vite.config.js` - 3-line config using `defineSiteConfig()` from `@uniweb/build/site`
76
- - `sites/*/main.js` - 1-line entry: `import 'virtual:uniweb-site-entry'`
76
+ - `sites/*/main.js` - Entry point using `start()` from `@uniweb/runtime`
77
77
  - `sites/*/site.yml` - Site configuration (foundation reference, title, i18n)
78
78
  - `sites/*/pages/` - Content pages (file-based routing)
79
79
 
@@ -1 +1,19 @@
1
- import 'virtual:uniweb-site-entry'
1
+ import initRuntime from '@uniweb/runtime'
2
+
3
+ const useRuntimeLoading = import.meta.env.VITE_FOUNDATION_MODE === 'runtime'
4
+
5
+ async function start() {
6
+ if (useRuntimeLoading) {
7
+ initRuntime({
8
+ url: '/foundation/foundation.js',
9
+ cssUrl: '/foundation/assets/style.css'
10
+ })
11
+ } else {
12
+ // #foundation alias is resolved by Vite based on site.yml config
13
+ const foundation = await import('#foundation')
14
+ await import('#foundation/styles')
15
+ initRuntime(foundation)
16
+ }
17
+ }
18
+
19
+ start().catch(console.error)
@@ -1 +1,6 @@
1
- import 'virtual:uniweb-site-entry'
1
+ import { start } from '@uniweb/runtime'
2
+
3
+ start({
4
+ foundation: import('#foundation'),
5
+ styles: import('#foundation/styles')
6
+ })
@@ -1 +1,6 @@
1
- import 'virtual:uniweb-site-entry'
1
+ import { start } from '@uniweb/runtime'
2
+
3
+ start({
4
+ foundation: import('#foundation'),
5
+ styles: import('#foundation/styles')
6
+ })