Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>edith-vscode-kitNew to Visual Studio Code? Get it now.
edith-vscode-kit

edith-vscode-kit

xhs-appworks

|
185 installs
| (2) | Free
Get and generate api code from edith
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

edith-vscode-kit README

edith-vscode-kit是小红书前端api TS类型&调用代码生成工具🔧

Tip: 只能在内网环境下使用

Features

  • 自动识别&生成edith接口调用
  • 自动生成edith接口出入参TS类型

Requirements

  • "vscode": "^1.84.0"
  • 小红书内网环境
  • 在项目目录下(与package.json同级)配置api-kit.config.js文件
module.exports = {
  outDir: "/src/services", // 生成文件输出的目录,请确保该文件目录正确且存在
  textGenerator: { // 自定义生成能力的扩展
    http: { // 方便自定义调用方法,如RN可能需要从'@xhs/asgard'引用http,再比如业务自己封装了一层http
      importText: `import { http } from '@xhs/launcher'`,
      get: "http.get",
      post: "http.post",
      put: "http.put",
      delete: "http.del"
    }
  }
}

Release Notes

In the future

  • 订阅需要改动的接口,监听接口变化,选择是否自动更新至本地
  • 本地一键开启Api Mock

For more information

  • 如遇到问题请优先查看常见问题
  • 仍有问题,可以自行填写问题记录,我们将会尽快联系你

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft