0.1.0 • Published 3 years ago

ts-dox v0.1.0

Weekly downloads
26
License
MIT
Repository
-
Last release
3 years ago

TsDox

TsDox is a utility to transform Typescript AST to JSON. It extracts the following data

  • classes
  • interfaces
  • methods
  • functions
  • properties
  • enums
  • comments (grouped by JsDoc tags, but untransformed text)
  • decorator

There is no command line interface. The library is meant to be used with tools lke gulp or webpack to render project documentation pages. Since every project has differen requirements, this library will not aim to offer a "ready to use" solution for rendering the doc files.

An example how to use it with

const path = require("path")
const tsdox = require("tsdox")

gulp
  .src("**/*.ts")
  .pipe(tsdox.transform())
  // or if you want to concat all the files into a single json, use
  // .pipe(tsdox.transform({ concat: "api.json" }))
  .pipe(gulp.dest("dist"))

If you use typescript to write a documentation renderer, you can use the typings like this

import {
  TsDoxFile,
  TsDoxClass,
  TsDoxInterface,
  TsDoxFunction,
  TsDoxMethod,
  TsDoxConstructor,
  TsDoxProperty,
  TsDoxParameter,
  TsDoxModifiers,
} from "tsdox/lib/runtime"
0.1.0

3 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago