- npm install
@ily1437/jsdoc
- cd
project_directory
;supposeproject_directory/src
is source dir. - run
node ./node_modules/@ily1437/jsdoc
with:-
v1.0.3+:
.jsdocrc.js
file in project root directorymodule.exports = { dir: './src', // docErrorDir: `dist/docErrorFiles/`, docOutputDir: `dist/docFiles/pages`, //optional debug: false, index: 'indexContent.html', mdConfig: 'mdConfig.json', //since 1.5.0 pageConfig: { //since 1.4.0 css: ['../page_patch.css'], js: [] }, indexConfig: { //since 1.4.0 css: ['index_patch.css'], js: [] }, demoConfig: { //since 1.7.8 text: 'Demos', url: '../demo.html', inputDir: './inputDirName', //since 1.8.0 outputDir: './outputDirName', //since 1.8.0 }, patchDir: './docPatch', //since 1.4.0 keywordsDic: { //since v1.2.3 Enum: true, ... } }
-
v1.0.2-: cmd params:
./src [enableDebug] [indexContentFilePath]
-
- fix bug for window
- fix catch
- fix bug for createClazz
- support: when read
index.js
, use its<dirname>.js
as doc file target - fix tip:
Cannot read properties of undefined (reading 'name')
- update
@param
when type is defined with json structure - support
type[]
- update
@see
- fix a bug
- change demo behavior
- change demo behavior
- optimize
demoConfig
- optimize code
- fix a bug
- fix a bug
- add DemoConfig for jsdocrc
- fix a bug for the api with
@ignore
keyword
- optimize
- enable doc content for ignoreClazz
- fix copy patch files
- fix for code
- fix menu item selected
- optimize code for indexContent
- output date and version of package to files
- Now all patchDir files are copied to output directory.
- fix position of menu item selected
- fix position of menu item selected
- fix menu item selected
- add quick-start nav
- fix a bug.
- change indexContent to a page slice.
- update menu
- support mdConfig:
-
when type is
String
, it is a path based on project root -
when type is
Array
orJSON
, it is config data.[ { "md": "readme.MD", "filename": "doc/md/readme.html", "template": "template/template.html" } ]
-
- move
github-dark.css
from js to config
- support css/js
patch
forindex & pages
- fix for createClazz
- fix a bug
- fix a bug for readClazzInfo
- fix a bug for the member of class which is filled with a variant in class file scope;
- fix a bug for
createClazz
, when it is avariant declaration
;
- support
@see {A.B#c}
- support multi-line comments
- support
@ignoreClazz
for class block comment and constructor comment
- add
keywordDic
for.jsdocrc.js
, you can highlight more keywords for api in jsdoc
- update highlight for code `
- fix bug for index page menu: Class items
- 支持export 值为 createClazz, 它的return值会作为Class来解析
build jsdoc
- 支持动态class的js doc生成
- 支持es
- static public attribute: static get prop = v;
- static public attribute: static get prop(){}
- static public member: static method(){}
- public attribute: get prop(){}
- public member: prop = v;
- public method: method(){}
- 支持@memberof / @see / @example / @params / @returns
- 支持关键字highlight
- 支持method的comments与内部变量关联时的引用
- 支持class的constructor备注与class备注的合一,优先使用constructor的备注
- 支持自定义首页