
文档:https://ty.cli.vrteam.top/
源码:https://github.com/bosombaby/ty-cli
1. npm 全局安装
npm i ty-cli-market -g
2. 快捷键 ty/ty-cli
3. 帮助命令 ty -h
Usage: ty-cli <command> [options]
A simple CLI tool for string manipulation
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
create [options] <project-name> create a new project
help [command] display help for command
Run ty-cli <command> --help for detailed usage of given command.
4. 版本查看 ty -V
1.1.0
create 命令也就是脚手架的核心指令,用来选择不同的执行模板并下载





当前是小程序的开发模板,具体模板使用说明可以查看相关文档。
目前团队内部后台管理系统过多,需求开发的页面逻辑或者相关组件重复率过高,跨项目开发很容易遇到重复编写大量代码、不同项目的技术栈/版本不统一、相关样式不统一等问题,迫切需要一款标准化、高扩展、简单便捷的脚手架工具来协助开发。
该工具要求具备的核心能力如下:
1. 切换镜像源到 npm 原生
npm config get registry
npm config set registry https://registry.npmjs.org/
2. npm login 登录(浏览器打开链接登录)
3. npm publih 发布(注意不要重名、登录问题)
4. 切换回到淘宝镜像源
npm config set registry https://registry.npmmirror.com
这里注意发布 npm 需要先进行登录,登录发布时需要明确包名称和版本号的唯一性。

Git 客户端无法在指定的时间内连接到 GitHub 服务器上的 443 端口
取消全局 Git 配置中设置的 HTTPS 代理服务器
git config --global --unset http.proxy
git config --global --unset https.proxy