Skip to content

code-to-json/code-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

code-to-json

Build Status Build Status Version Codacy Badge Coverage Status Total alerts

Getting Started

# 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

CLI Options

--format

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

--out

The path to a folder that will be used (or created, with all intermediate folders) to contain all of code-to-json's output

--program

Path to the root of a JavaScript or TypeScript project, which should contain both a valid package.json and a tsconfig.json

Packages

© 2018 LinkedIn