I am trying to add a customTag to jsdoc. I have created a file in the plugins directory like this:
method.js
exports.defineTags = function(dictionary) { dictionary.defineTag("methodHttp", { mustHaveValue: true, canHaveType: false, canHaveName: true, onTagged: function(doclet, tag) { doclet.methodHttp = tag.value; } }); };
Then I added to my conf.json:
{ "tags": { "allowUnknownTags": true }, "source": { "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" }, "plugins": [ "plugins/method" ], "templates": { "cleverLinks": false, "monospaceLinks": false, "default": { "outputSourceFiles": true } }, "jsVersion": 180 }
And now I try to get this on my template. I'm on method.tmpl.
I tried:
self.find('methodHttp')[0] data.methodHttp[0] data.methodHttp
But it doesn't work. What is wrong with my code?