Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
,read(pathJs).then(contents => require('jsdoc-api').explain({ source: contents }))
])
value: function getJsdocData(options) {
var jsdocOptions = new JsdocOptions(options);
return jsdocApi.explain(jsdocOptions);
}
}, {
/**
* CLI helper to initially generate doc api files from *.vue files.
*
* @example bash
* node vue-proto-api.js ./src/component.vue [./api/component.js]
*/
const path = require('path')
const jsdoc = require('jsdoc-api')
const fs = require('fs-extra')
const util = require('util')
const { kebabCase } = require('lodash/fp')
let src = process.argv[2]
let dest = process.argv[3]
jsdoc.explain({
files: path.resolve(process.cwd(), src),
cache: false,
configure: path.resolve(__dirname, '../.jsdoc.js'),
}).then(doclets => {
let vueProtoParts = extractVueProtoParts(doclets)
let vueProtoApi = {
props: vueProtoParts.props.map(mapProp),
members: vueProtoParts.otherMembers.map(mapMember),
methods: vueProtoParts.methods.map(mapMethod),
events: vueProtoParts.events.map(mapEvents),
slots: vueProtoParts.slots.map(mapSlot),
}
let data = `export default ${util.inspect(vueProtoApi, {depth: null})}`
if (dest) {
function getJsdocData(options) {
return jsdocApi.explain(Object.assign({}, options));
}
function parseScriptToJSDocJSON(src) {
return jsdoc.explain({
files: src
})
.then(json => {
return jsdocParse(json);
});
}
getJsdocData (options) {
const jsdocOptions = new JsdocOptions(options)
return jsdocApi.explain(jsdocOptions)
}
static parse(value, config) {
return jsdoc.explain({ files: value }).then(function(data) {
return data;
});
}