or run

npx @tessl/cli init
Log in

Version

Files

docs

cli.mdindex.mdprogrammatic-api.md
tile.json

task.mdevals/scenario-9/

Custom Documentation Generator

Build a tool that generates markdown documentation from pre-processed JSDoc data without parsing source files.

Problem Description

You need to create a documentation generator that accepts structured JSDoc data and produces markdown output. Instead of parsing JavaScript source files, your tool should work with pre-existing template data.

The tool should:

  • Accept an array of template data objects (matching jsdoc-parse output format)
  • Generate markdown documentation from this data
  • Support basic customization options like heading depth
  • Handle multiple documentation entries (functions, classes, etc.)

Requirements

Your solution should implement a function that:

  1. Takes pre-processed template data as input
  2. Uses the documentation generation package to render markdown
  3. Returns the generated markdown string
  4. Supports optional formatting configuration

Test Cases

  • Given template data for a simple function, it generates valid markdown documentation @test
  • Given template data for multiple functions, it generates complete markdown with all entries @test
  • Given template data with custom heading depth option, it generates markdown with correct heading levels @test

Implementation

@generates

API

/**
 * Generates markdown documentation from pre-processed template data.
 *
 * @param {Array<Object>} templateData - Array of JSDoc template data objects
 * @param {Object} options - Optional configuration for rendering
 * @param {number} options.headingDepth - Starting heading level (default: 2)
 * @returns {Promise<string>} Promise resolving to generated markdown
 */
async function generateDocs(templateData, options = {}) {
  // IMPLEMENTATION HERE
}

module.exports = { generateDocs };

Dependencies { .dependencies }

jsdoc-to-markdown { .dependency }

Provides markdown documentation rendering from template data.

@satisfied-by