create-slidev 0.45.0 → 0.46.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/README.md CHANGED
@@ -19,4 +19,3 @@ yarn create slidev
19
19
  ## License
20
20
 
21
21
  MIT License © 2021 [Anthony Fu](https://github.com/antfu)
22
-
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-slidev",
3
3
  "type": "module",
4
- "version": "0.45.0",
4
+ "version": "0.46.0",
5
5
  "description": "Create starter template for Slidev",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -1,16 +1,16 @@
1
- [build.environment]
2
- NODE_VERSION = "18"
3
-
4
1
  [build]
5
- publish = "dist"
6
- command = "npm run build"
2
+ publish = "dist"
3
+ command = "npm run build"
4
+
5
+ [build.environment]
6
+ NODE_VERSION = "18"
7
7
 
8
8
  [[redirects]]
9
- from = "/.well-known/*"
10
- to = "/.well-known/:splat"
11
- status = 200
9
+ from = "/.well-known/*"
10
+ to = "/.well-known/:splat"
11
+ status = 200
12
12
 
13
13
  [[redirects]]
14
- from = "/*"
15
- to = "/index.html"
16
- status = 200
14
+ from = "/*"
15
+ to = "/index.html"
16
+ status = 200
@@ -8,7 +8,7 @@
8
8
  "export": "slidev export"
9
9
  },
10
10
  "dependencies": {
11
- "@slidev/cli": "^0.45.0",
11
+ "@slidev/cli": "^0.46.0",
12
12
  "@slidev/theme-default": "latest",
13
13
  "@slidev/theme-seriph": "latest"
14
14
  }
@@ -2,7 +2,7 @@
2
2
  theme: seriph
3
3
  background: https://source.unsplash.com/collection/94734566/1920x1080
4
4
  class: text-center
5
- highlighter: shiki
5
+ highlighter: shikiji
6
6
  lineNumbers: false
7
7
  info: |
8
8
  ## Slidev Starter Template
@@ -128,14 +128,24 @@ image: https://source.unsplash.com/collection/94734566/1920x1080
128
128
 
129
129
  # Code
130
130
 
131
- Use code snippets and get the highlighting directly![^1]
131
+ Use code snippets and get the highlighting directly, and even types hover![^1]
132
132
 
133
- ```ts {all|2|1-6|9|all}
133
+ ```ts {all|5|1-6|9|all} twoslash
134
+ // TwoSlash enables TypeScript hover information and errors in markdown code blocks
135
+ // Learn more at https://www.typescriptlang.org/dev/twoslash/
136
+ function getUser(id: number): User {
137
+ return undefined as any
138
+ }
139
+ function saveUser(id: number, user: User) {
140
+ // ...
141
+ }
142
+ // ---cut---
134
143
  interface User {
135
144
  id: number
136
145
  firstName: string
137
146
  lastName: string
138
147
  role: string
148
+ // ^?
139
149
  }
140
150
 
141
151
  function updateUser(id: number, update: User) {
@@ -203,7 +213,6 @@ Also, HTML elements are valid:
203
213
  </div>
204
214
  -->
205
215
 
206
-
207
216
  ---
208
217
  class: px-20
209
218
  ---
@@ -400,7 +409,6 @@ cloud {
400
409
  [Example 1]
401
410
  }
402
411
 
403
-
404
412
  database "MySql" {
405
413
  folder "This is my folder" {
406
414
  [Folder 3]
@@ -410,7 +418,6 @@ database "MySql" {
410
418
  }
411
419
  }
412
420
 
413
-
414
421
  [Another Component] --> [Example 1]
415
422
  [Example 1] --> [Folder 3]
416
423
  [Folder 3] --> [Frame 4]