Leaflet / Leafdoc

A lightweight NaturalDocs-like LeafletJS-style documentation generator
54 stars 19 forks source link

No output #42

Closed trusktr closed 5 years ago

trusktr commented 5 years ago

Alright, I'm attempting to get it to output something.

I tried opening up my src/index.ts file, and I copied the Leafdoc docs into it with @ symbols, so it looks like this:

import {Class, Mixin} from 'lowclass'
export {Class, Mixin}
export * from './core'
export * from './html'
export * from './components'
export * from './layout'

export const version = '21.0.6'

/*
@namespace Command-line usage

Leafdoc includes a small command-line utility, useful when running from a console or a shell script, accepting some of the Leafdoc options. The syntax is:

`leafdoc [options] [files]`

@example

`leafdoc -t templates/pretty -c '@' --verbose -o documentation.html src/*.js`

*/

// @option template: String='templates/basic'; Akin to [Leafdoc.templateDir](#leafdoc.templatedir)
// @option t; Alias of `template`
// @option character: String='@'; Akin to [Leafdoc.leadingCharacter](#leafdoc.leadingcharacter)
// @option c; Alias of `character`
// @option verbose: Boolean=false; Akin to [Leafdoc.verbose](#leafdoc.verbose)
// @option v; Alias of `verbose`
// @option output: String=undefined; File to write the documentation to. If left empty, documentation will be outputted to `stdout` instead.
// @option o; Alias of `output`
// @option json: Boolean=false; Write the internal JSON representation of the documentation instead of a templated HTML file.
// @option o; Alias of `output`

Then I tried to run leafdoc on it, like this:

npx leafdoc -c '@' -t node_modules/leafdoc/templates/basic -o documentation.html src/index.ts

and the resulting HTML file is empty:

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <style>
    table {
        border-collapse: collapse;
    }
    table td, table th {
        border: 1px solid #888;
    }
    pre code {
        display: inline-block;
        background: #eee;
    }
    td:last-child code {
        background: #eee;
    }
    body {
        font-family: Sans;
    }
    </style>
</head>
<body>
    <h2>Leafdoc generated API reference</h2>

</body></html>

What am I missing?

trusktr commented 5 years ago

After I got up and running with https://github.com/Leaflet/Leafdoc/pull/43, the problem here went away, so I'll close this.