yapi-to-code
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

安装

npm install -D yapi-to-code

使用

配置文件

命令行模式

// package.json

...
script:{
    'yapi-to-code':'yapi-to-code -p src/yapi-to-code.config.cjs -w append -i 94306 89455'
}
...

代码模式

import { getConfig, yapiToCode } from 'yapi-to-code'
/**
 * 所有参数都是可选的 configPath 默认为 ./yapi-to-code.config.cjs
 */
const config = getConfig({
  ids: [94306],
  configPath: ['src/yapi-to-code.config.js'],
  writeMode: ['append']
})
yapiToCode({ config })

其他

项目token

alt text

菜单id

alt text

接口id

alt text

Readme

Keywords

none

Package Sidebar

Install

npm i yapi-to-code

Weekly Downloads

9

Version

1.0.4

License

none

Unpacked Size

23.5 kB

Total Files

6

Last publish

Collaborators

  • czb3279338858