# install this library
yarn add -D code-to-json
# generate JSON information about a TypeScript or JavaScript program
code-to-json \
--program . \ # path to a folder containing a tsconfig.json
--out ./docs \ # folder where output is written to
This tool can generate two different formats of JSON. You may select one using the --format
option`
--format |
Notes |
---|---|
raw |
Granular low-level data, including many details that relate to the filesystem the tool was run on (i.e,. absolute paths) |
formatted |
Higher-level data, intended for use in documentation tools |
both |
Both raw and formatted data formats as individual files |
# using the --format flag to emit granular data
code-to-json --program ./my-lib --out ./docs --format raw
The path to a folder that will be used (or created, with all intermediate folders) to contain all of code-to-json
's output
Path to the root of a JavaScript or TypeScript project, which should contain both a valid package.json
and a tsconfig.json
-
@code-to-json/utils - Low level utilities, with no dependencies
-
@code-to-json/utils-ts - TypeScript utilities
-
@code-to-json/utils-node - [NODE] Node.js utilities
-
@code-to-json/core - Code analysis functionality
-
@code-to-json/core-linker - Data linker for "raw" data format
-
@code-to-json/formatter - Data formatter
-
@code-to-json/formatter-linker - Data linker for "formatted" data format
-
@code-to-json/comments - Comment-parsing functionality
-
@code-to-json/test-helpers - [NODE] Testing helpers for running mocha in node
-
@code-to-json/schema - JSON schema for code-to-json output formats
-
@code-to-json/cli - [NODE] - CLI interface
© 2018 LinkedIn