@@ -27,6 +27,45 @@ can also install `webxdc-dev` in just your development project as a
27
27
28
28
## Usage
29
29
30
+ ### Starting
31
+
32
+ #### Running a directory
33
+
34
+ In case you don't use bundling tooling and have a simple webxdc project where
35
+ you have a directory that is zipped directly into a ` .xdc ` file, you can run it
36
+ directly:
37
+
38
+ ``` shell
39
+ webxdc-dev run /path/to/webxdc/project
40
+ ```
41
+
42
+ This may not be convenient or may not even work if you use tools like ` vite ` or
43
+ ` webpack-dev-server ` though. For that, see below.
44
+
45
+ #### Running an .xdc file
46
+
47
+ You can run an ` .xdc ` file with the following command:
48
+
49
+ ``` shell
50
+ webxdc-dev run /path/to/my.xdc
51
+ ```
52
+
53
+ #### With vite, webpack-dev-server, etc
54
+
55
+ It can be very useful to use a dev server that supports bundling and hot
56
+ reloading, like ` vite ` or ` webpack-dev-server ` . In this case your
57
+ project has a ` package.json ` .
58
+
59
+ You can run ` webxdc-dev ` against such a dev server directly. For instance if
60
+ you have your project under development running on ` http://localhost:3000 ` ,
61
+ this is how you can run it:
62
+
63
+ ``` shell
64
+ webxdc-dev run http://localhost:3000
65
+ ```
66
+
67
+ ### After starting
68
+
30
69
When you start ` webxdc-dev ` , it opens a browser window with the webxdc-dev UI.
31
70
Two webxdc application instances are already running. You can start the
32
71
instance in the embedded UI with the start button in each instance header. You
@@ -57,7 +96,7 @@ are running.
57
96
The dev tool console shows messages with the same color prefix as the instance
58
97
UIs.
59
98
60
- ### Clean state
99
+ #### Clean state
61
100
62
101
Instances start with a clean slate: empty ` localStorage ` and ` sessionStorage ` .
63
102
This means an instance may flash briefly with old state when it is opened for
@@ -66,41 +105,6 @@ the first time after startup.
66
105
The UI also lets you clear the state with the ` reset ` button - this refreshes
67
106
both server and client state, and is as if you restarted ` webxdc-dev ` .
68
107
69
- ### Running a directory
70
-
71
- In case you don't use bundling tooling and have a simple webxdc project where
72
- you have a directory that is zipped directly into a ` .xdc ` file, you can run it
73
- directly:
74
-
75
- ``` shell
76
- webxdc-dev run /path/to/webxdc/project
77
- ```
78
-
79
- This may not be convenient or may not even work if you use tools like ` vite ` or
80
- ` webpack-dev-server ` though. For that, see below.
81
-
82
- ### Running an .xdc file
83
-
84
- You can run an ` .xdc ` file with the following command:
85
-
86
- ``` shell
87
- webxdc-dev run /path/to/my.xdc
88
- ```
89
-
90
- ### With vite, webpack-dev-server, etc
91
-
92
- It can be very useful to use a dev server that supports bundling and hot
93
- reloading, like ` vite ` or ` webpack-dev-server ` . In this case your
94
- project has a ` package.json ` .
95
-
96
- You can run ` webxdc-dev ` against such a dev server directly. For instance if
97
- you have your project under development running on ` http://localhost:3000 ` ,
98
- this is how you can run it:
99
-
100
- ``` shell
101
- webxdc-dev run http://localhost:3000
102
- ```
103
-
104
108
## Command-line options
105
109
106
110
### Controlling the port number with ` -p `
0 commit comments