muyuan-tool-ss

2.0.2 • Public • Published

新架构辅助工具

  • vue 老架构(暂时不支持)
  • react 新架构

具体功能

  • 快速创建主页面模板
  • 快速创建 service 接口文件夹
  • 通过接口文档快速生成接口封装,后期做成可视化(暂时不支持)

config.json 配置

字段名 类型 是否必填 描述 默认值
mode react | vue true 用来区分项目类型 -
type ts | js true 是 ts 还是 js 目前强制使用 ts -
pagePath String true 相对于根目录下页面文件夹存放的位置 -
apiPath String true 相对于根目录请求文件夹存放的位置 -

使用方法

  • tool-cli init

  • tool-cli add

    • 当 mode 是 react 时候,只需要输入相对 pagePath 下的路径即可
      egg: {
      "mode": "react",
      "type": "ts",
      "pagePath": "./src/pages",
      "apiPath": "./src/api"
      }
      tool-cli add
      请输入针对当前命令行的地址: ./demo  //最后生成的文件则是 ./src/pages/demo

Readme

Keywords

Package Sidebar

Install

npm i muyuan-tool-ss

Weekly Downloads

0

Version

2.0.2

License

ISC

Unpacked Size

288 kB

Total Files

31

Last publish

Collaborators

  • dodo7419