5
मैं jsdoc पर एक कस्टमटाग जोड़ने की कोशिश कर रहा हूं।jsdoc पर टैग जोड़ने और उपयोग करने के लिए कैसे?
method.js
exports.defineTags = function(dictionary) {
dictionary.defineTag("methodHttp", {
mustHaveValue: true,
canHaveType: false,
canHaveName: true,
onTagged: function(doclet, tag) {
doclet.methodHttp = tag.value;
}
});
};
तब मैं अपने conf.json को जोड़ा गया:
{
"tags": {
"allowUnknownTags": true
},
"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [ "plugins/method" ],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
},
"jsVersion": 180
}
और अब मैं कोशिश मैं इस तरह प्लगइन्स निर्देशिका में एक फ़ाइल बनाया है इसे मेरे टेम्पलेट पर प्राप्त करने के लिए। मैं method.tmpl पर हूँ।
मैंने कोशिश की:
self.find('methodHttp')[0]
data.methodHttp[0]
data.methodHttp
लेकिन यह काम नहीं करता। मेरे कोड में क्या गलत है?