@yaoxfly/cli 1.0.0 → 1.0.2

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 (3) hide show
  1. package/README.md +83 -0
  2. package/package.json +5 -3
  3. package/template.json +10 -0
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # @yaoxfly/cli
2
+ 干净极简的项目脚手架集成了`vue3`项目模板,`vitepress`项目模板等,开箱即用。
3
+
4
+
5
+ # 使用 npx
6
+
7
+ 无感知下载模板,无需安装`@yaoxfly/cli`。
8
+
9
+ ```
10
+ npx @yaoxfly/cli create [工程名]
11
+
12
+ ```
13
+
14
+ > 国内`npx`使用`npm`镜像下载可能会比慢,请切换其他镜像比如`taobao`镜像,可使用`nrm`管理,或其他方式,[镜像切换](#镜像切换)。
15
+
16
+ # 下载
17
+
18
+ 你也可以下载后再使用,全局下载
19
+
20
+ ```
21
+ npm i @yaoxfly/cli -g
22
+ ```
23
+
24
+ 使用
25
+ ```
26
+ yx-cli create [工程名]
27
+ ```
28
+ <a id='mirrorSwitching'></a>
29
+
30
+ # 镜像切换
31
+
32
+ ## 使用nrm
33
+
34
+ 全局下载
35
+
36
+ ```
37
+ npm i nrm@1.0.0 -g
38
+ ```
39
+ >`node`版本较低,高版本`nrm`可能无法使用。
40
+
41
+ 查看镜像列表
42
+
43
+ ```
44
+ nrm ls
45
+ ```
46
+
47
+ 使用淘宝镜像
48
+ ```
49
+ nrm use taobao
50
+ ```
51
+
52
+ ## 使用npm
53
+
54
+ 设置淘宝镜像
55
+
56
+ ```
57
+ npm config set registry https://registry.npmmirror.com/
58
+ ```
59
+
60
+ 查看是否配置成功
61
+ ```
62
+ npm config get registry
63
+ ```
64
+
65
+ 查看npm当前配置
66
+ ```
67
+ npm config list
68
+ ```
69
+
70
+ 设置npm镜像
71
+ ```
72
+ npm config set registry https://registry.npmjs.org/
73
+ ```
74
+
75
+ ## 使用.npmrc
76
+ 根目录下,创建`.npmrc`写入下面内容
77
+
78
+ ```
79
+ registry= https://registry.npmmirror.com/
80
+ ```
81
+
82
+
83
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaoxfly/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "脚手架工具,开箱即用",
5
5
  "main": "bin",
6
6
  "private": false,
@@ -9,13 +9,15 @@
9
9
  "scripts": {
10
10
  "dev": "tsc -w",
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
- "lint": "eslint . --ext .js,.ts, --fix"
12
+ "lint": "eslint . --ext .js,.ts, --fix",
13
+ "publish": "npm version patch -f"
13
14
  },
14
15
  "bin": {
15
16
  "yx-cli": "./bin/index.js"
16
17
  },
17
18
  "files": [
18
- "bin"
19
+ "bin",
20
+ "template.json"
19
21
  ],
20
22
  "publishConfig": {
21
23
  "access": "public"
package/template.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "vue3-simple-frame": {
3
+ "url": "yaoxfly/vue3-simple-frame",
4
+ "description": "[vue3.2]、typeScript 、vite3、 pinia、 eslint、axios、mock、多环境"
5
+ },
6
+ "vitepress-template": {
7
+ "url": "yaoxfly/vitepress-template",
8
+ "description": "[vitepress]、typeScript、vue3、自定义主题"
9
+ }
10
+ }