create-wings-theme 0.5.4

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.
Files changed (2) hide show
  1. package/index.js +23 -0
  2. package/package.json +29 -0
package/index.js ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * `npm create wings-theme` 的入口。
4
+ *
5
+ * `npm create <name>` / `npx create-<name>` 解析的是**独立包** `create-wings-theme`,
6
+ * 而不是 `vuepress-theme-wings` 里的 bin —— 所以即使主题包已经带了脚手架,
7
+ * 这条命令在只有主题包时依然会 404。这个包就是补上那一段:
8
+ * 一个只做转发的薄壳,真正的逻辑仍留在主题包里,只有一份实现、一套测试。
9
+ *
10
+ * 之所以从主题包 import 而不是把脚手架复制一份:脚手架与主题共用
11
+ * `shared/options/localeData` 等纯函数,复制出来必然随时间漂移,
12
+ * 使用者会拿到一个和主题不同版本的生成器。
13
+ */
14
+ import { runScaffoldCli } from 'vuepress-theme-wings/scaffold/cli'
15
+
16
+ runScaffoldCli()
17
+ .then((code) => {
18
+ process.exitCode = code
19
+ })
20
+ .catch((error) => {
21
+ console.error(error)
22
+ process.exitCode = 1
23
+ })
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "create-wings-theme",
3
+ "version": "0.5.4",
4
+ "description": "npm create wings-theme —— 生成一个空的 Wings 站点骨架",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "create-wings-theme": "./index.js"
9
+ },
10
+ "files": [
11
+ "index.js"
12
+ ],
13
+ "keywords": [
14
+ "vuepress",
15
+ "vuepress-theme",
16
+ "wings",
17
+ "create",
18
+ "scaffold"
19
+ ],
20
+ "dependencies": {
21
+ "vuepress-theme-wings": "^0.5.4"
22
+ },
23
+ "engines": {
24
+ "node": ">=20.6.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ }
29
+ }