jsdoc 3.4.2에서 사용자 정의 태그를 작성하려고합니다. config.json
파일 내가이 라인 jsdoc로 사용자 정의 태그 작성
exports.defineTags = function (dictionary) {
dictionary.defineTag("service", {
mustHaveValue: true,
canHaveType: false,
canHaveName: true,
onTagged: function (doclet, tag) {
doclet.service = tag.value;
}
});
};
하지만 내가 코드의 @Service를 사용하는 경우, 그것은 표시되지 않습니다를 추가 한
custom-tags.js
에서
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"source": {
"include": [
"app/"
],
"exclude": [],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [
"plugins/custom-tags.js"
],
"templates": {
"cleverLinks": false,
"monospaceLinks": false
},
"opts": {
"destination": "./docs",
"recurse": true,
"encoding": "utf8"
}
}
입니다. 나는 이것과 관련된 몇 가지 링크를 보았고 우리가 템플릿을 생성 할 필요가있는 커스텀 태그를 찾았지만 그것을 생성하는 방법을 발견하지 못했습니다. 내 Windows 컴퓨터에 jsdoc을 전 세계에 설치했습니다.
나는이에보고 있었다 - 여기 템플릿을 생성하기위한 약간의 문서가 : https://github.com/jsdoc3/ jsdoc/tree/master/templates – Vineet