I am trying to create custom tags in jsdoc 3.4.2. The config.json
file is
{
"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"
}
}
In the custom-tags.js
i have added these lines
exports.defineTags = function (dictionary) {
dictionary.defineTag("service", {
mustHaveValue: true,
canHaveType: false,
canHaveName: true,
onTagged: function (doclet, tag) {
doclet.service = tag.value;
}
});
};
But when i used the @service in the code, it is not showing. I had looked some link relating this and found out for custom tags we need to create template, but not found a way of creating one. I had installed jsdoc globally on my windows machine.