dailer
6 years ago
3 changed files with 109 additions and 1 deletions
@ -0,0 +1,34 @@
|
||||
const jsdoc2md = require('jsdoc-to-markdown'); |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
|
||||
|
||||
const options = { |
||||
"files": [ |
||||
"src/modules/workbench/utils.js" |
||||
] |
||||
}; |
||||
|
||||
const templateData = jsdoc2md.getTemplateDataSync(options); |
||||
|
||||
|
||||
const utils = []; |
||||
let entryName = "" |
||||
|
||||
templateData.forEach((item, index) => { |
||||
if (item.name === "Dec.Utils") { |
||||
utils.push(item); |
||||
entryName = item.customTags.find((value, index) => { |
||||
return value.tag === "entryname"; |
||||
}) |
||||
} |
||||
if (item.memberof === "module:Dec.Utils") { |
||||
utils.push(item); |
||||
} |
||||
}) |
||||
|
||||
|
||||
const outputDir = __dirname; |
||||
|
||||
const output = jsdoc2md.renderSync({ data: utils }); |
||||
fs.writeFileSync(path.resolve(outputDir, `${entryName.value}.md`), output); |
@ -0,0 +1,72 @@
|
||||
<a name="module_Dec.Utils"></a> |
||||
|
||||
## Dec.Utils |
||||
平台workbench utils方法 |
||||
|
||||
|
||||
* [Dec.Utils](#module_Dec.Utils) |
||||
* [~getWorkbenchSubDirectoryById(pId, callback)](#module_Dec.Utils..getWorkbenchSubDirectoryById) |
||||
* [~getCompleteDirectoryTree(callback)](#module_Dec.Utils..getCompleteDirectoryTree) |
||||
* [~searchWorkbenchSubDirectory(keyword, callback)](#module_Dec.Utils..searchWorkbenchSubDirectory) |
||||
* [~handlerCollect(id, isFavorite, callback)](#module_Dec.Utils..handlerCollect) |
||||
* [~getFavoritesList(callback)](#module_Dec.Utils..getFavoritesList) |
||||
|
||||
<a name="module_Dec.Utils..getWorkbenchSubDirectoryById"></a> |
||||
|
||||
### Dec.Utils~getWorkbenchSubDirectoryById(pId, callback) |
||||
根据父级id获取下一层子目录,根级id为 decision-directory-root |
||||
|
||||
**Kind**: inner method of [<code>Dec.Utils</code>](#module_Dec.Utils) |
||||
|
||||
| Param | Description | |
||||
| --- | --- | |
||||
| pId | 父级id | |
||||
| callback | | |
||||
|
||||
<a name="module_Dec.Utils..getCompleteDirectoryTree"></a> |
||||
|
||||
### Dec.Utils~getCompleteDirectoryTree(callback) |
||||
获取完整的目录树数据 |
||||
|
||||
**Kind**: inner method of [<code>Dec.Utils</code>](#module_Dec.Utils) |
||||
|
||||
| Param | |
||||
| --- | |
||||
| callback | |
||||
|
||||
<a name="module_Dec.Utils..searchWorkbenchSubDirectory"></a> |
||||
|
||||
### Dec.Utils~searchWorkbenchSubDirectory(keyword, callback) |
||||
搜索目录树 |
||||
|
||||
**Kind**: inner method of [<code>Dec.Utils</code>](#module_Dec.Utils) |
||||
|
||||
| Param | |
||||
| --- | |
||||
| keyword | |
||||
| callback | |
||||
|
||||
<a name="module_Dec.Utils..handlerCollect"></a> |
||||
|
||||
### Dec.Utils~handlerCollect(id, isFavorite, callback) |
||||
收藏或者取消收藏目录 |
||||
|
||||
**Kind**: inner method of [<code>Dec.Utils</code>](#module_Dec.Utils) |
||||
|
||||
| Param | Type | Description | |
||||
| --- | --- | --- | |
||||
| id | | | |
||||
| isFavorite | <code>boolean</code> | 是否收藏 | |
||||
| callback | | | |
||||
|
||||
<a name="module_Dec.Utils..getFavoritesList"></a> |
||||
|
||||
### Dec.Utils~getFavoritesList(callback) |
||||
获取收藏列表 |
||||
|
||||
**Kind**: inner method of [<code>Dec.Utils</code>](#module_Dec.Utils) |
||||
|
||||
| Param | |
||||
| --- | |
||||
| callback | |
||||
|
Loading…
Reference in new issue