搭建脚手架
工具
- npm link
- Commander(vue-cli 在使用) cac 替换 commander (vite 在使用) 轻量级, 0 依赖
- download-git-repo (vue-cli 在使用)
- inquire.js(命令行选项配置, vue-cli在使用)
- child_process
- shell.js
思路
- 通过 npm link 生成本地测试环境
- 通过 Commander 生成命令
- 通过 inquire.js 生成交互式命令行
- 通过 download-git-repo 拉取项目模板
- 通过 child_process 执行 shell 脚本