create-unibest 2.5.1 → 3.0.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/README.md +1 -18
- package/bin/index.js +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +748 -0
- package/package.json +30 -48
- package/LICENSE +0 -21
- package/README.DEVELOPMENT.md +0 -21
- package/outfile.cjs +0 -126
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<h1 align="center">✨create unibest✨</h1>
|
|
3
2
|
|
|
4
3
|
<p align="center">
|
|
@@ -17,21 +16,5 @@
|
|
|
17
16
|
## 🚤 快速使用
|
|
18
17
|
|
|
19
18
|
```shell
|
|
20
|
-
pnpm create unibest
|
|
21
|
-
pnpm create unibest <项目名称> -t <模板名>
|
|
19
|
+
pnpm create unibest@latest
|
|
22
20
|
```
|
|
23
|
-
|
|
24
|
-
`create unibest` 支持 `-t` 参数选择模板,目前已有 `7` 个模板,分别是 `base`、`tabbar`、`spa`、`demo`、`i18n`、`hbx-base`、`hbx-demo`。
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
# VS Code 模板
|
|
28
|
-
pnpm create unibest my-project # 默认用 base 模板
|
|
29
|
-
pnpm create unibest my-project -t base # 基础模板(2025-06-21 开始已经合并了tabbar和spa)
|
|
30
|
-
pnpm create unibest my-project -t base-sard-ui # 使用 sard-ui 库的基础模板
|
|
31
|
-
pnpm create unibest my-project -t i18n # 多语言模板
|
|
32
|
-
pnpm create unibest my-project -t demo # 所有demo的模板(包括i18n)
|
|
33
|
-
|
|
34
|
-
# HBuilderX 模板,方便使用 uniCloud 云开发(已经不推荐使用了)
|
|
35
|
-
pnpm create unibest my-project -t hbx-base # hbx的base模板
|
|
36
|
-
pnpm create unibest my-project -t hbx-demo # hbx的demo模板,包含所有的demo
|
|
37
|
-
```
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { dirname } from 'node:path'
|
|
3
|
+
import process from 'node:process'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
7
|
+
const __dirname = dirname(__filename)
|
|
8
|
+
|
|
9
|
+
// 导入主程序
|
|
10
|
+
import('../dist/index.js').catch((err) => {
|
|
11
|
+
console.error('Failed to load CLI:', err)
|
|
12
|
+
process.exit(1)
|
|
13
|
+
})
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|