安装 Darabonba

Darabonba

Darabonba(原名 TeaDSL)

NPM version build status codecov David deps npm download

一种 OpenAPI 应用的领域特定语言。可以利用它为任意风格的接口生成多语言的 SDK、代码示例、测试用例、接口编排等。

Get Started

安装 darabonba 命令行工具:

$ npm install @darabonba/cli -g

设置仓库地址:

$ dara config set registry https://darabonba.api.aliyun.com

创建项目文件夹

$ mkdir <项目名称>

操作记录

Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ source ./venv/Scripts/activate
(venv)
Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ ll
total 0
drwxr-xr-x 1 Administrator 197121 0 9月 6 21:05 venv/
(venv)
Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ which npm
/c/Program Files/nodejs/npm
(venv)
Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ npm install @darabonba/cli -g
C:\Users\Administrator\AppData\Roaming\npm\dara -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\@darabonba\cli\bin\dara.js
+ @darabonba/cli@1.1.3
added 303 packages from 257 contributors in 59.281s
(venv)

$ ls /c/users/Administrator/AppData/Roaming/npm/dara
/c/users/Administrator/AppData/Roaming/npm/dara*
(venv)
Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ /c/users/Administrator/AppData/Roaming/npm/dara config set registry https://darabonba.api.aliyun.com

Update successfully!

(venv)
Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ export PATH=$PATH:/c/users/Administrator/AppData/Roaming/npm/
(venv)

Administrator@DQRV59CDE8AZCYG MINGW64 /g/GITHUB/aliyun-game
$ which dara
/c/users/Administrator/AppData/Roaming/npm/dara
(venv)