UNPKG

taitan

Version:

小程序开发辅助工具

103 lines (71 loc) 1.9 kB
#### 安装 ```sh $ npm i -g taitan ``` #### 准备工作 首先需要在开发者工具的设置 -> 安全设置中开启服务端口 然后设置开发者工具的安装路径 拿mac系统举例: ```sh # 设置安装路径 $ taitan set weapp-tool-path /Applications/wechatwebdevtools.app # 查看已设置的安装路径 $ taitan show weapp-tool-path $ -> /Applications/wechatwebdevtools.app ``` #### 添加项目到本地 将项目添加到本地收藏夹,后续可选择直接打开已添加的项目,无需进入到项目目录 ```sh $ taitan add project ``` #### 查看收藏夹中已添加的项目列表 ```sh $ taitan list project ``` #### 添加编译模式页面到本地收藏项目 ```sh # 手动输入要添加的页面路径 $ taitan add page # 从项目pages路由列表中选择页面路径 $ taitan add page -s ``` #### 查看本地项目中已添加编译模式页面 ```sh # 查看当前项目已添加的编译模式页面 $ taitan list page # 查看指定项目已添加的编译模式页面 $ taitan list page -s ``` #### 清除本收藏的项目/已添加的编译页面 ```sh # 清除全部项目 $ taitan clear project -a # 清除指定项目 $ taitan clear project #清除全部页面 $ taitan clear page -a #清除指定页面 $ taitan clear page ``` #### 在开发者工具中打开项目 ```sh # 打开当前目录所在项目 $ taitan open # 打开指定目录下的项目 $ taitan open -d 项目绝对路径 # 打开本地收藏的项目 $ taitan open -s ``` #### 生成预览二维码 ```sh # 手动输入要预览的项目路径 $ taitan preview -d 项目绝对路径 # 选择本地收藏的项目 $ taitan preview -s # 选择项目中app.json中的路由配置页面 $ taitan preview -p # 选择收藏项目中保存的编译页面 $ taitan preview -ps # 手动输入要预览的页面路径 $ taitan preview -s -i ```