create-slidev 51.1.2 → 51.2.1

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/index.mjs CHANGED
@@ -7,7 +7,7 @@ import path from 'node:path'
7
7
  // @ts-check
8
8
  import process from 'node:process'
9
9
  import { fileURLToPath } from 'node:url'
10
- import { blue, bold, cyan, dim, green, yellow } from 'kolorist'
10
+ import { blue, bold, cyan, dim, green, yellow } from 'ansis'
11
11
  import minimist from 'minimist'
12
12
  import prompts from 'prompts'
13
13
  import { x } from 'tinyexec'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-slidev",
3
3
  "type": "module",
4
- "version": "51.1.2",
4
+ "version": "51.2.1",
5
5
  "description": "Create starter template for Slidev",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -16,11 +16,15 @@
16
16
  "bin": {
17
17
  "create-slidev": "index.mjs"
18
18
  },
19
+ "files": [
20
+ "index.mjs",
21
+ "template"
22
+ ],
19
23
  "engines": {
20
24
  "node": ">=18.0.0"
21
25
  },
22
26
  "dependencies": {
23
- "kolorist": "^1.8.0",
27
+ "ansis": "^3.15.0",
24
28
  "minimist": "^1.2.8",
25
29
  "prompts": "^2.4.2",
26
30
  "tinyexec": "^0.3.2"
@@ -8,7 +8,7 @@
8
8
  "export": "slidev export"
9
9
  },
10
10
  "dependencies": {
11
- "@slidev/cli": "^51.1.2",
11
+ "@slidev/cli": "^51.2.1",
12
12
  "@slidev/theme-default": "latest",
13
13
  "@slidev/theme-seriph": "latest",
14
14
  "vue": "^3.5.13"
package/build.mjs DELETED
@@ -1,38 +0,0 @@
1
- import { dirname, resolve } from 'node:path'
2
- import { fileURLToPath } from 'node:url'
3
- import fs from 'fs-extra'
4
-
5
- const __dirname = fileURLToPath(new URL('.', import.meta.url))
6
- const __templateDir = resolve(__dirname, 'template')
7
- const __pagesDir = resolve(__templateDir, 'pages')
8
-
9
- const shouldCreatePagesDict = () => !fs.existsSync(__pagesDir)
10
-
11
- // key: copy to (relative ./)
12
- // value: origin (relative ./template)
13
- const needCopyFiles = {
14
- 'slides.md': '../../../demo/starter/slides.md',
15
- 'pages/imported-slides.md': '../../../demo/starter/pages/imported-slides.md',
16
- 'snippets/external.ts': '../../../demo/starter/snippets/external.ts',
17
- }
18
-
19
- async function main() {
20
- if (shouldCreatePagesDict())
21
- await fs.ensureDir(__pagesDir)
22
-
23
- await Promise.all(
24
- Object.keys(needCopyFiles).map(async (relativeTargetPath) => {
25
- const sourcePath = resolve(__templateDir, needCopyFiles[relativeTargetPath])
26
- const targetPath = resolve(__templateDir, relativeTargetPath)
27
- if (fs.existsSync(targetPath))
28
- await fs.rm(targetPath)
29
-
30
- await fs.ensureDir(dirname(targetPath))
31
- await fs.copy(sourcePath, targetPath)
32
- }),
33
- )
34
- // eslint-disable-next-line no-console
35
- console.log('done...')
36
- }
37
-
38
- main()