ishz-cli
v1.0.25
Published
脚手架本质就是一个工具,作用是能够让使用者专注于写代码,它可以让我们只用一个命令就生成一个已经配置好的项目,而不用我们再花时间去配置和安装相关依赖,可以在很大程度上提升我们的开发效率。比如我们常用的`create-vue`和`create-react-app`就是脚手架,很多大厂也都有自己的脚手架。
Downloads
5
Readme
介绍
为什么需要脚手架?
脚手架本质就是一个工具,作用是能够让使用者专注于写代码,它可以让我们只用一个命令就生成一个已经配置好的项目,而不用我们再花时间去配置和安装相关依赖,可以在很大程度上提升我们的开发效率。比如我们常用的create-vue
和create-react-app
就是脚手架,很多大厂也都有自己的脚手架。
本脚手架具备功能
- 选择框架 vue&uniapp
- vue 框架选择是否引入模块
- 选择 ESlink
- 选择 xx
相关依赖
- commander: 命令行处理工具
- chalk: 命令行输出美化工具
- inquirer:命令行交互工具
- ora:终端 loading 美化工具
- git-clone:下载项目模版工具
- figlet:终端生成艺术字
- fs-extra:用来操作本地目录
talk is cheap, show me the code
发布
1.注册 npm 账号 2.在本地登录并发布
登录刚注册的账号
→ npm login
- Username:用户名
- Password:密码
- Email:注册邮箱
- Enter one-time password: 邮箱会收到邮件一次性密码
在我们脚手架的根目录下执行发布命令
→ npm publish
注意: 1.警录和发包前一定要先查看 npm 的源,需要修改为 https://registry.npmjs.org/ 2.在发布时包名不能重复,所以可以先在线上搜索下看看有没有存在的包,如果出现 403 错误可能是包名和线上的包重复了,修改 packagejson 中的 name 即可