@lyjkfz/customer-cli 0.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 ADDED
@@ -0,0 +1,60 @@
1
+ ## 自定义脚手架工具
2
+
3
+ # customer-cli
4
+
5
+ ![npm 版本](https://img.shields.io/badge/customer-cli_0.0.1-green)
6
+
7
+ ## 😊简介
8
+
9
+ - 用于快速搭建前端项目的工具
10
+
11
+ ## 📕模版
12
+
13
+ - 快速生成 vue3 + ts +vite + element-plus 的项目模板
14
+
15
+ ## 📚安装
16
+
17
+ ```bash
18
+ npm install -g customer-cli
19
+ # 或者使用 yarn 全局安装
20
+ yarn global add customer-cli
21
+ ```
22
+
23
+ ## 📐使用方法
24
+
25
+ ```bash
26
+ customer-cli create <projectName> # 创建项目
27
+ ```
28
+
29
+ ## ✒️查看脚手机版本
30
+
31
+ ```bash
32
+ customer-cli --version # 查看版本号
33
+ ```
34
+
35
+ ## ✏️开发流程
36
+
37
+ - 使用 rollup 打包
38
+ - 最后发布为一个 npm 包
39
+ - 脚手架原理
40
+ - 从远端仓库克隆项目模板
41
+ - 安装依赖
42
+
43
+ - 脚手架创建项目的过程
44
+ - pnpm init 初始化项目
45
+ - pnpx tsc init ts初始化
46
+ - 安装依赖
47
+ - @rollup/plugin-commonjs 识别commonjs
48
+ - @rollup/plugin-node-resolve 识别第三方模块
49
+ - @rollup/plugin-typescript 识别ts
50
+ - rollup 打包工具
51
+ - rollup-plugin-node-externals 不打入打包文件
52
+ - rollup-plugin-typescript2 识别ts文件
53
+ - @rollup/plugin-json 识别 json 文件
54
+ - commander 命令行工具
55
+ - ora 终端加载动画
56
+ - progress-estimator 进度条
57
+ - log-symbols 终端输出图标
58
+ - chalk 终端输出颜色
59
+ - @inquirer/prompts 终端输入交互
60
+ - simple-git 执行 git 命令
package/bin/index.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ // 指定node的路径, 告诉系统使用哪个node环境来执行该脚本文件
3
+ // 解决了不同用户安装了不同版本的node环境时,执行脚本文件时找不到对应版本的问题
4
+ // 可以让系统动态的找到对应版本的node环境来执行脚本文件
5
+
6
+ require('../dist/index.js'); // 执行打包的 dist/index.js 文件