全局安装脚手架 npm i react-tsx-cli -g 因为设置了 npm bin 可直接在终端使用 create-react-tsx 命令 脚手架获取使用者输入的信息,cli会前往仓库下载模板,渲染后返回 eg: create-react-tsx init projectName