@evjs/cli 0.3.0 → 0.3.1
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 +17 -23
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Page tree is materialized as an SPA or MPA:
|
|
|
20
20
|
- Shared HTML template: `./index.html`
|
|
21
21
|
- Client dev server: port 3000
|
|
22
22
|
- API server (dev): port 3001
|
|
23
|
-
-
|
|
23
|
+
- Reachable server functions discovered via the `"use server"` directive
|
|
24
24
|
- Server request-route anchors auto-discovered from `./src/apis/**/api.*`
|
|
25
25
|
|
|
26
26
|
`routing.mode` selects SPA or MPA materialization for the same semantic
|
|
@@ -39,15 +39,17 @@ Page-and-Route tree. It does not select a different file convention.
|
|
|
39
39
|
|
|
40
40
|
### `ev dev`
|
|
41
41
|
|
|
42
|
-
Uses the default bundler adapter directly
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
Uses the default bundler adapter directly:
|
|
43
|
+
|
|
44
|
+
1. **browser dev server** (preferred port 3000) — client bundle with HMR;
|
|
45
|
+
2. **framework server** (preferred port 3001) — starts when the active
|
|
46
|
+
BuildPlan emits a server runtime.
|
|
45
47
|
|
|
46
48
|
### `ev build`
|
|
47
49
|
|
|
48
50
|
Runs the production build through `@evjs/ev` with `NODE_ENV=production`:
|
|
49
51
|
- `dist/client/` — optimized client assets with content hashes.
|
|
50
|
-
- `dist/server
|
|
52
|
+
- `dist/server/` — server artifacts when the BuildPlan requires them.
|
|
51
53
|
- `dist/deployment-metadata.json` — canonical deployment metadata for tooling
|
|
52
54
|
and adapters.
|
|
53
55
|
|
|
@@ -86,8 +88,8 @@ export default defineConfig({
|
|
|
86
88
|
|
|
87
89
|
The `dev` and `server.dev` fields accept extra options that are merged with
|
|
88
90
|
defaults. Change only `routing.mode` to `"mpa"` to materialize the same Page
|
|
89
|
-
tree as Page-owned Documents.
|
|
90
|
-
|
|
91
|
+
tree as Page-owned Documents. MPA accepts static Page paths and rejects
|
|
92
|
+
dynamic/catch-all paths and router-only boundary facets.
|
|
91
93
|
|
|
92
94
|
## Project Structure
|
|
93
95
|
|
|
@@ -119,25 +121,17 @@ Only `page.*` creates a canonical client Page and Route. Other files below a
|
|
|
119
121
|
Page directory, including `index.*`, are ordinary Page-private source and need
|
|
120
122
|
no `_` prefix. The Page directory determines the URL in both SPA and MPA mode.
|
|
121
123
|
|
|
122
|
-
##
|
|
124
|
+
## Authoring Boundaries
|
|
123
125
|
|
|
124
|
-
1.
|
|
125
|
-
|
|
126
|
-
2.
|
|
127
|
-
|
|
128
|
-
3.
|
|
129
|
-
4. **Do not install bundler internals manually** — the default adapter is
|
|
130
|
-
provided by `@evjs/cli`.
|
|
131
|
-
5. **Config file must be `ev.config.ts`** — not `evjs.config.ts`.
|
|
132
|
-
6. **Import `defineConfig` and `definePageConfig` from `@evjs/ev`** — not from
|
|
133
|
-
`@evjs/server`.
|
|
126
|
+
1. Canonical apps publish Pages through `src/pages/**/page.*` and declare
|
|
127
|
+
`routing.mode`; colocated `index.*` files remain ordinary source.
|
|
128
|
+
2. Configure the framework in `ev.config.ts`; the CLI supplies the default
|
|
129
|
+
bundler adapter.
|
|
130
|
+
3. Import `defineConfig` and `definePageConfig` from `@evjs/ev`.
|
|
134
131
|
|
|
135
132
|
Explicit `application.routes` and `component`/`routes` config are SPA-only
|
|
136
|
-
route-tree inputs in `@evjs/ev`;
|
|
137
|
-
|
|
138
|
-
routing models. File-convention applications must use `page.tsx` for every
|
|
139
|
-
published Page, keep Page configuration in `page.config.ts`, and select only
|
|
140
|
-
`routing.mode: "spa" | "mpa"`.
|
|
133
|
+
route-tree inputs in `@evjs/ev`; they normalize into the same CoreGraph and
|
|
134
|
+
cannot be combined with canonical `routing` discovery.
|
|
141
135
|
|
|
142
136
|
## Bundled Dependencies
|
|
143
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evjs/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Command-line wrapper for the evjs framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"check-types": "tsc --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@evjs/bundler-utoopack": "0.3.
|
|
32
|
-
"@evjs/ev": "0.3.
|
|
31
|
+
"@evjs/bundler-utoopack": "0.3.1",
|
|
32
|
+
"@evjs/ev": "0.3.1",
|
|
33
33
|
"@logtape/logtape": "^2.0.4",
|
|
34
34
|
"commander": "^12.1.0"
|
|
35
35
|
},
|