How to use the @vuese/markdown-render function in @vuese/markdown-render

To help you get started, we’ve selected a few @vuese/markdown-render 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 shuidi-fed / vuese / packages / cli / lib / genMarkdown.ts View on Github external
return files.map(async (p: string) => {
    const abs = path.resolve(p)
    const source = await fs.readFile(abs, 'utf-8')
    try {
      const parserRes = parser(source, {
        babelParserPlugins,
        basedir: path.dirname(abs)
      })
      const r = new Render(parserRes)
      let markdownRes = r.renderMarkdown()

      if (!markdownRes) return

      let str = markdownRes.content
      let compName = markdownRes.componentName
        ? markdownRes.componentName
        : path.basename(abs, '.vue')
      const groupName = markdownRes.groupName

      str = str.replace(/\[name\]/g, compName)
      let targetDir = ''
      let targetFile = ''
      if (genType === 'markdown' && markdownDir === '*') {
        targetDir = path.dirname(abs)
        targetFile = markdownFile || compName

@vuese/markdown-render

Render raw markdown string according to AST

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular @vuese/markdown-render functions