You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/install.md
+86Lines changed: 86 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,3 +136,89 @@ You can visit your slides from http://localhost/
136
136
137
137
138
138
Refer to the [tangramor/slidev_docker](https://github.com/tangramor/slidev_docker) for more details.
139
+
140
+
### Command Line Interface (CLI)
141
+
142
+
`@slidev/cli` Expose a few commands you can use with `npx slidev ...` or by adding scripts in your `package.json`:
143
+
```json
144
+
{
145
+
"script": {
146
+
"dev": "slidev"
147
+
}
148
+
}
149
+
```
150
+
151
+
In that case you will be able to run `npm run dev`.
152
+
153
+
You can pass options to any commands:
154
+
155
+
* boolean option are `true` if they are present, false otherwise (example: `slidev --open`)
156
+
* some options can have values you can add just after the option or by using the `=` character (example: `slidev --port 8080` or `slidev --port=8080`)
157
+
158
+
If you use npm scripts, don't forget to add `--` after the npm command:
159
+
```bash
160
+
npm run slidev -- --open
161
+
```
162
+
163
+
#### `slidev [entry]`
164
+
165
+
Start a local server for Slidev.
166
+
167
+
*`[entry]` (`string`, default: `slides.md`): path to the slides markdown entry.
168
+
169
+
Options:
170
+
171
+
*`--port`, `-p` (`number`, default: `3030`): port number.
172
+
*`--open`, `-o` (`boolean`, default: `false`): open in browser.
173
+
*`--remote [password]` (`string`): listen to public host and enable remote control, if a value is passed then the presenter mode is private and only accessible by passing the given password in the URL query `password` parameter.
*`--out`, `-o` (`string`, default: `dist`): output dir.
188
+
*`--base` (`string`, default: `/`): base URL (see https://cli.vuejs.org/config/#publicpath)
189
+
*`--download` (`boolean`, default: `false`): allow to download the slides as PDF inside the SPA.
190
+
*`--theme`, `-t` (`string`): override theme.
191
+
192
+
#### `slidev export [entry]`
193
+
194
+
Export slides to PDF (or other format).
195
+
196
+
*`[entry]` (`string`, default: `slides.md`): path to the slides markdown entry.
197
+
198
+
Options:
199
+
200
+
*`--output` (`string`, default: use `exportFilename` (see https://sli.dev/custom/#frontmatter-configures) or use `[entry]-export`): path to the output.
0 commit comments