tuax / tua-api

🏗 一款可配置的通用 api 请求函数生成工具(A common tool helps converting configs to api functions)

Home Page:https://tuax.github.io/tua-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: support command line interface

BuptStEve opened this issue · comments

你的功能请求是否与某些问题相关?请描述
当前虽然已经有了 @tua-mp/cli,但还是不妥。

描述您想要的解决方案
tua-api 自身支持 cli

  • 支持内置默认模板
  • 支持自定义模板

配置文件定为 tua.config.js。在没有配置文件时,使用内置模板。可配置的选项有 apiTemplates,即 api 模板的路径,默认值为 .templates

module.exports = {
    apiTemplates: 'some/path',
}

还是升级 @tua-mp/cli 吧,尝鲜用户可以用 npx @tua-mp/cli add api <name>