Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@esydoc/resolver-doc
Advanced tools
@esydoc/resolver-doc
一个解析 Api 源码生成文档的解析器
npm i @esydoc/resolver-qa -D
在 esydoc.config.js
文件中的resolves
字段添加@esydoc/resolver-doc
对应的配置就 ok 拉。
// for example in esydoc.config.js
{
resolves: {
'@esydoc/resolver-doc': {
pathPrefix: 'global.hyExt',
output: {
template: "doc-website",
dist: path.join(__dirname, "doc-website")
}
},
}
}
调用路径前缀
无。
所有resolver-doc
的配置都在命名空间doc
内。
// api config file
{
doc: {
// resolver-doc config
}
}
在esydoc
整套体系来说,API的配置可分两种,第一种是扫描代码自动生成的,另外一种是手动填写。
example:string
- resolver-doc
会自动生成 demo 的代码,非常便利,生成的调用数据取得都是数据类型
的默认值
, 所以有些时候需要我们补上定制化的调用参数。explanation?:string[]
- resolver-doc
会自动添加接口描述和版本号,所以这个字段是为了文档说明的填写补充。compatibility:Compatibility[]
- 接口兼容性的描述配置。qa: QA[]
- 接口 QA 的描述配置。compatibility
和 qa
的配置在resolver-doc
内部有默认值,会帮助我们减少配置量。
兼容性配置的数据结构和默认值如下:
enum Status {
pending, // 从0开始
success,
fail,
noImplement,
uninvolved
}
type Compatibility = {
version: string
web: Status.uninvolved
app_ios: Status.uninvolved
app_android: Status.uninvolved
zs_ios: Status.uninvolved
zs_android: Status.uninvolved
pc_viewer: Status.uninvolved
pc_streamer: Status.uninvolved
}
type CompatibilityList = Compatibility[]
QA 配置的数据结构和默认值如下:
enum Status {
pending, // 从0开始
success,
fail,
noImplement,
uninvolved
}
type QA = {
platformName: string // web | app_ios | ..., 跟Compatibility内的平台有关字段保持一致
platform: string
auth: Status.success
pass: Status.success
reason: Status.pending
frequency: Status.pending
}
type QAList = QA[]
以advance.showLogin
为例子:
接口配置:
{
demo: {
compatibility: [
{
version: '1.5.0',
web: 1,
app_ios: '7.13.353.15465',
app_android: '7.13.6-34249',
pc_viewer: '5.4.1.0',
zs_ios: 4,
zs_android: 4,
pc_streamer: 4
}
],
qa: [
{
platform: 'pc_viewer',
auth: 0,
}
],
}
}
生成结果:
FAQs
> TODO: description
The npm package @esydoc/resolver-doc receives a total of 1 weekly downloads. As such, @esydoc/resolver-doc popularity was classified as not popular.
We found that @esydoc/resolver-doc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.