Giter Club home page Giter Club logo

documentalist's Introduction

Documentalist CircleCI

npm npm

A sort-of-static site generator optimized for living documentation of software projects.

Documentation

See the full usage documentation here.

Development

Prerequisites

  • Yarn v1.x
  • Node v18.x

Dev tasks

  • yarn build compiles & builds source code
  • yarn lint lints source code
  • yarn test runs unit test suites
  • yarn deploy pushes docs built in the packages/docs/dist folder to the gh-pages branch

Releases

For maintainers only:

Autorelease

documentalist's People

Contributors

adidahiya avatar dependabot[bot] avatar gerrit0 avatar giladgray avatar justinbhopper avatar lukasbach avatar mcintyret avatar simkimsia avatar styu avatar svc-excavator-bot avatar themadcreator avatar walkerburgin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documentalist's Issues

Support for accessors

As far as I can tell, documentalist does not generate information about accessors in classes.

class Example {
  get x() {
    return 1;
  }
}

In this example, the accessor x is not documented. This is a bug in my opinion because documentations for projects that use accessors commonly will lack many details.

IE 11 support

docs site does not load on IE 11 because source uses some ES6 syntax features like arrow functions and classes.

documentalist 1.0

  • constructor type info #49
  • static members in interfaces #49
  • get files in order #50
  • README #52
  • enum type: Kind.Class, not just Class #53
  • index signatures! { [key: string]: IType } #59
  • sourceUrl field is better than fileName #60
  • type arguments in class name
  • release notes
  • windows build #35
  • client interfaces consumption
  • output built files in /lib/ paths instead of /dist/

Interface property default values include extra markup

This is a regression in v5.0.0 caused by #156

Previously, @default tag values on interface properties would just contain the text of the default value:

image

Now in v5.0.0, we get extra markup around the value which is unnecessary and should be stripped out in the output:

image

TypeScript does not parse files in node_modules

The TypeScript plugin skips all files in node_modules. I have a use case where my API re-uses interfaces from a dependency, but I can't include definitions of that interface because all node_modules are ignored.

Potential typo in the lerna.json

I'm not sure if this is intentional or not, but the lerna.json has:

"userWorkspaces": true,

I'm pretty sure that should be:

"useWorkspaces": true,

If that's correct, I can make a PR trivially.

@event tags are erased

Currently I'm using the compiler. I use the compiler to build JSON, which I then use to create markdown. According to https://jsdoc.app/tags-event.html, I should be able to use @event tags to document different events that are emitted.

Desired usage:

/**
 * @event Drawer:event Emits when the drawer has closed.
 * @type {object}
 * @event Drawer:opened Emits when the drawer has opened.
 * @type {object}
 */
export class Drawer {

Actual Result:
Using this notation actually removes the Drawer entry from docs.json.

replace ts-quick-docs with typedoc

ts-quick-docs is stuck on [email protected] and each version bump requires a complete re-engineering of the parser. for instance, 2.1 -> 2.2 has huge changes to how jsdoc tags are processed and I simply can't figure out the new compiler APIs to access them, so I can't upgrade ts-q-d.

I propose we kill ts-q-d and use typedoc directly for all our typescript doc'ing needs. this'll require some serious work but should future-proof the project and reduce the maintenance burden going forward.

Regression in JSDoc markdown parsing

This is a regression in v5.0.0 caused by #156

Previously, we were easily able to include JSDoc comment markdown containing inline code snippets on interface properties.

This comment:

    /**
     * Props to pass to the query [InputGroup component](#core/components/input-group).
     *
     * Some properties are unavailable:
     * - `inputProps.value`: use `query` instead
     * - `inputProps.onChange`: use `onQueryChange` instead
     * - `inputProps.disabled`: use `disabled` instead
     * - `inputProps.fill`: use `fill` instead
     *
     * Other notes:
     * - `inputProps.tagName` will override `popoverProps.targetTagName`
     * - `inputProps.className` will work as expected, but this is redundant with the simpler `className` prop
     */

Would get parsed as the following markdown string:

'Props to pass to the [InputGroup component](#core/components/input-group).

Some properties are unavailable:
- `inputProps.value`: use `value` instead
- `inputProps.disabled`: use `disabled` instead
- `inputProps.type`: cannot be customized, always set to "text"

Note that `inputProps.tagName` will override `popoverProps.targetTagName`.'

Which would get easily rendered by marked to the following HTML:

<p>Props to pass to the query <a href="#core/components/input-group">InputGroup component</a>.</p>
<p>Some properties are unavailable:</p>
<ul>
<li><code>inputProps.value</code>: use <code>query</code> instead</li>
<li><code>inputProps.onChange</code>: use <code>onQueryChange</code> instead</li>
<li><code>inputProps.disabled</code>: use <code>disabled</code> instead</li>
<li><code>inputProps.fill</code>: use <code>fill</code> instead</li>
</ul>
<p>Other notes:</p>
<ul>
<li><code>inputProps.tagName</code> will override <code>popoverProps.targetTagName</code></li>
<li><code>inputProps.className</code> will work as expected, but this is redundant with the simpler <code>className</code> prop</li>
</ul>

Now, there's a bug where each inline code snippet gets put on its own line, which breaks markdown rendering. The JSDoc comment above gets parsed as:

`Props to pass to the [InputGroup component](#core/components/input-group).

Some properties are unavailable:
- 
`inputProps.value`
: use 
`value`
 instead
- 
`inputProps.disabled`
: use 
`disabled`
 instead
- 
`inputProps.type`
: cannot be customized, always set to "text"

Note that 
`inputProps.tagName`
 will override 
`popoverProps.targetTagName`
.'

Which results in this bad rendered HTML:

<p>Props to pass to the query <a href="#core/components/input-group">InputGroup component</a>.</p>
<h2>Some properties are unavailable:</h2>
<h2><code>inputProps.value</code>
: use 
<code>query</code>
 instead</h2>
<h2><code>inputProps.onChange</code>
: use 
<code>onQueryChange</code>
 instead</h2>
<h2><code>inputProps.disabled</code>
: use 
<code>disabled</code>
 instead</h2>
<p><code>inputProps.fill</code>
: use 
<code>fill</code>
 instead</p>
<h2>Other notes:</h2>
<p><code>inputProps.tagName</code>
 will override 
<code>popoverProps.targetTagName</code></p>
<p>- 
<code>inputProps.className</code>
 will work as expected, but this is redundant with the simpler 
<code>className</code>
 prop</p>

Which renders in Blueprint's docs like this:

image

This is likely a TypeDoc bug.

Old dependencies in last 1.6 release

It would be nice with a new release with update dependencies. Some dependencies like marked are quite old. I could do a PR to update as many none breaking dependencies as possible, if someone are ready to review and hopefully merge the changes.

Add React support out of the box

Hey all. I’d realllllllly like to use this instead of storybook. I know that the React plugin and all is in blueprint source, but it seems heavily tied into blueprint’s build / gulp tasks. It would be nice if documentalist came with React support and an example of a React theme / output out of the box.

Consider using libnpm instead of spawning npm process

Consider using libnpm instead of spawning npm process in npm plugin

Every piece of information that is currently used by npm plugin can be acquired through libnpm without using npm cli directly.

versions property is sorted by npm cli view command (https://github.com/npm/cli/blob/656bce7dd0f9753a273912e803261ed246593924/lib/view.js#L50)

const packument = require('libnpm/packument');
const semver = require('semver');

packument('libnpm', {
    fullMetadata: true
}).then((data) => {
    const distTags = data["dist-tags"] || {};
    console.log({
        name: data.name,
        description: data.description,
        latestVersion: distTags.latest,
        nextVersion: distTags.next,
        versions: Object.keys(data.versions).sort(semver.compareLoose),
    });
});

Fails with Error: Unknown @page '_nav' in toTree()

npx documentalist "src/**/*"

node version: 6

Error: Unknown @page '_nav' in toTree()
    at PageMap.toTree (_npx/61470/lib/node_modules/documentalist/dist/page.js:55:19)
    at MarkdownPlugin.compile (_npx/61470/lib/node_modules/documentalist/dist/plugins/markdown.js:42:27)
    at _npx/61470/lib/node_modules/documentalist/dist/documentalist.js:127:69
    at step (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:38:23)
    at Object.next (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:19:53)
    at step (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:23:97)
    at Object.next (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:19:53)
    at _npx/61470/lib/node_modules/documentalist/dist/documentalist.js:13:71
    at __awaiter (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:9:12)
    at Documentalist.documentFiles (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:114:16)
    at Documentalist.<anonymous> (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:102:44)
    at step (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:38:23)
    at Object.next (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:19:53)
    at _npx/61470/lib/node_modules/documentalist/dist/documentalist.js:13:71
    at __awaiter (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:9:12)
    at Documentalist.documentGlobs (_npx/61470/lib/node_modules/documentalist/dist/documentalist.js:98:16)

Please update marked dependency to remove install vulnerabilities warning

[email protected]

npm audit fix output

fixed 0 of 3 vulnerabilities in 7084 scanned packages
3 vulnerabilities required manual review and could not be updated

npm audit output

=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance

Moderate Regular Expression Denial of Service
Package marked
Patched in >=0.6.2
Dependency of documentalist [dev]
Path documentalist > marked
More info https://npmjs.com/advisories/812
Moderate Regular Expression Denial of Service
Package marked
Patched in >=0.6.2
Dependency of documentalist [dev]
Path documentalist > typedoc > marked
More info https://npmjs.com/advisories/812
Moderate Regular Expression Denial of Service
Package marked
Patched in >=0.7.0
Dependency of documentalist [dev]
Path documentalist > typedoc > marked
More info https://npmjs.com/advisories/1076

found 3 vulnerabilities (1 low, 2 moderate) in 7084 scanned packages
3 vulnerabilities require manual review. See the full report for details.

Some types include unnecessary empty type params list

This is a regression in v5.0.0 caused by #156

Previously, types without generic type params were rendered as expected, without any <> type params list:

image

Now, they often include an extraneous & unnecessary empty type params list, which can mislead users to believe that the type is generic:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.