@@ -48,9 +48,12 @@ Docgen includes some scripts to help testing the page.
48
48
49
49
## VuePress
50
50
51
- Use Node.js 16 for building VuePress (other versions like Node.js 18 are not supported)
51
+ Use Node.js 18 for building VuePress (other versions are not officially supported).
52
52
53
53
``` bash
54
+ # Switch to node 18 (for nvm or nvm-compatible tool users)
55
+ nvm use
56
+
54
57
# Install dependencies
55
58
npm ci
56
59
```
@@ -74,13 +77,38 @@ npm run dev
74
77
The ` dev ` -Mode ** excludes** the huge amount device-pages which slows down the build process drastically.
75
78
If you are interested in the device-pages you could include them by using the ` npm run dev:devices ` npm-run script.
76
79
80
+ #### Include specific device
81
+
82
+ When running in ` dev ` -Mode, you can also specify a device (but this device only) which you would like to include in the build process.
83
+ Useful when working on improving notes of just one device.
84
+ ` INCLUDE_DEVICE ` variable should be supplied with device's filename (see [ ` /docs/devices ` ] ( /docs/devices/ ) folder), without the ` .md. ` extension.
85
+
86
+ ``` bash
87
+ # Run vuepress in dev mode with specific device included
88
+ npx cross-env INCLUDE_DEVICE=< DEVICE_FILE_NAME> npm run dev
89
+
90
+ # Example for TS011F_plug_1
91
+ npx cross-env INCLUDE_DEVICE=TS011F_plug_1 npm run dev
92
+ ```
93
+
94
+ #### Change development port
95
+
96
+ You can change development server port when the default one (8080) is taken on your system.
97
+
98
+ ``` bash
99
+ # Run vuepress in dev mode on specified port
100
+ npx cross-env DEV_PORT=< PORT_NUMBER> npm run dev
101
+
102
+ # Example for port no 15080
103
+ npx cross-env DEV_PORT=15080 npm run dev
104
+ ```
77
105
78
106
## Docker
79
107
80
108
You can also just use a docker-image include Node.js.
81
109
82
110
``` bash
83
- $ docker run --rm -v $PWD :/app -u $UID -ti node:16 bash
111
+ $ docker run --rm -v $PWD :/app -u $UID -ti node:18-slim bash
84
112
node@87e1438ef553:/$ cd /app
85
113
node@87e1438ef553:/app$ npm ci
86
114
node@87e1438ef553:/app$ npm run dev
0 commit comments