dekit-cli 0.2.3 → 0.3.0
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/bin/dekit.ts +5 -10
- package/dist/editor/assets/{index-yt1AtkL3.js → index-D16Bm-Rw.js} +13 -13
- package/dist/editor/assets/{index-Bx5YsS46.css → index-HLKs1tz-.css} +1 -1
- package/dist/editor/index.html +2 -2
- package/editor/src/App.tsx +33 -7
- package/editor/src/styles/editor.css +4 -2
- package/editor/vite.config.ts +6 -0
- package/package.json +3 -2
- package/src/design-server.ts +5 -4
- package/src/injected/inspector.ts +37 -3
- package/src/server.ts +32 -6
- package/src/vite-plugin-dekit.ts +1 -0
package/bin/dekit.ts
CHANGED
|
@@ -11,13 +11,14 @@ Commands:
|
|
|
11
11
|
init [path] Initialize a new design project
|
|
12
12
|
add <type> <name> Add a page or component
|
|
13
13
|
ls List pages and components
|
|
14
|
-
serve Start the preview server (default)
|
|
14
|
+
serve Start the preview server (default, port 7980)
|
|
15
15
|
screenshot <ref> Take a screenshot of a page or element
|
|
16
16
|
resolve <ref> Resolve a ref to file path and line range
|
|
17
17
|
usage Print the agent usage guide
|
|
18
18
|
|
|
19
19
|
Options:
|
|
20
20
|
-c, --config Path to dekit.yaml
|
|
21
|
+
-p, --port Editor server port (default: 7980)
|
|
21
22
|
-h, --help Show this help message
|
|
22
23
|
|
|
23
24
|
Run 'dekit <command> --help' for command-specific help.
|
|
@@ -102,16 +103,10 @@ async function main() {
|
|
|
102
103
|
}
|
|
103
104
|
case "serve": {
|
|
104
105
|
const config = await loadConfig(configArg);
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
10
|
|
108
|
-
);
|
|
109
|
-
const designPort = parseInt(
|
|
110
|
-
commandArgs.find((_, i, a) => a[i - 1] === "--design-port") ?? "3001",
|
|
111
|
-
10
|
|
112
|
-
);
|
|
106
|
+
const portArg = commandArgs.find((_, i, a) => a[i - 1] === "-p");
|
|
107
|
+
const port = portArg ? parseInt(portArg, 10) : undefined;
|
|
113
108
|
const noOpen = commandArgs.includes("--no-open");
|
|
114
|
-
await startServers({ config, port,
|
|
109
|
+
await startServers({ config, port, noOpen });
|
|
115
110
|
break;
|
|
116
111
|
}
|
|
117
112
|
case "screenshot": {
|