How to use the jsdoc-api.explain function in jsdoc-api

To help you get started, we’ve selected a few jsdoc-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Sjeiti / TinySort / task / doc.js View on Github external
	,read(pathJs).then(contents => require('jsdoc-api').explain({ source: contents }))
])
github jsdoc2md / jsdoc-to-markdown / es5 / lib / jsdoc-to-markdown.js View on Github external
value: function getJsdocData(options) {
      var jsdocOptions = new JsdocOptions(options);
      return jsdocApi.explain(jsdocOptions);
    }
  }, {
github ghettovoice / vuelayers / build / vue-proto-api.js View on Github external
/**
 * 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) {
github amekkawi / cwlogs-writable / .bin / docs / index.js View on Github external
function getJsdocData(options) {
	return jsdocApi.explain(Object.assign({}, options));
}
github elix / elix / tasks / buildDocsHelper.js View on Github external
function parseScriptToJSDocJSON(src) {
  return jsdoc.explain({
    files: src
  })
  .then(json => {
    return jsdocParse(json);
  });
}
github jsdoc2md / jsdoc-to-markdown / index.js View on Github external
getJsdocData (options) {
    const jsdocOptions = new JsdocOptions(options)
    return jsdocApi.explain(jsdocOptions)
  }
github spacedoc / spacedoc / adapters / js / index.js View on Github external
static parse(value, config) {
    return jsdoc.explain({ files: value }).then(function(data) {
      return data;
    });
  }

jsdoc-api

A programmatic interface for jsdoc

MIT
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis