0.1.0 ā¢ Published 2 years ago
topodoc v0.1.0
docgraph
An advanced documentation generator for JavaScript with first-class support for React. Built with ts-morph and xdm.
Features
šø Directed documentation graph
š MDX for mixing Markdown and JSX
š¼ Compiled code examples
š Quick links to source code for development and production
Install
yarn add docgraph
npm install docgraph
Usage
Start by importing the [addProject] helper:
import { addProject } from 'docgraph'
const project = addProject()
Now that we've added a project, we can start to add information to it and describe our system. Let's add a local components
directory of React components:
const components = project.getSourceFiles('components/index.ts')
If you've chosen to skip adding files automatically or want to add specific files to your documentation graph, you can use the [addSourceFiles] helper:
const components = project.addSourceFiles('components/index.ts')
We can now look at any export and get the related information for it:
const component = components.getExport('Button')
component.references // array of references to this component
component.emit()
0.1.0
2 years ago