Skip to content

Latest commit

 

History

History
86 lines (63 loc) · 3.97 KB

README.md

File metadata and controls

86 lines (63 loc) · 3.97 KB
unwritten

GitHub license npm version GitHub issues npm weekly downloads GitHub repo stars GitHub workflow status


unwritten is a cli tool to automatically generate documentation from your JavaScript or TypeScript library by utilizing JSDoc comments and the TypeScript compiler to extract types and relevant information.

Warning

This project is at a really early stage and currently under heavy development. It is not feature complete and it may not or only partially work with your project. You have been warned.

Installation

npm i unwritten

Usage

unwritten <path/to/entry-file.ts> [options]

Options

--output <path/to/output/file-name>     # Specify the output directory and the
-o <path/to/output/file-name>           # file name. Defaults to ./docs/api 
                                        # based on the current working 
                                        # directory.

--tsconfig <path/to/tsconfig.json>      # Provide a tsconfig file used to
-t <path/to/tsconfig.json>              # compile your project. unwritten will
                                        # try to find the tsconfig by itself if
                                        # no tsconfig.json is provided.

--config <path/to/.unwritten.json>      # Provide an unwritten config used to
-c <path/to/.unwritten.json>            # render the documentation. unwritten
                                        # will try to find the .unwritten.json
                                        # config by itself if none is provided
                                        # or uses the default config.

--renderer <md | html | json>           # Choose the format of the rendered 
-r <md | html | json>                   # output. Defaults to `md` for markdown.
                                        # It is also possible to provide a
                                        # custom renderer by providing the path
                                        # to the file that default exports the 
                                        # renderer.

--silent                                # Disables any console output.
-s

--debug                                 # Enables verbose console output.
-d

--version                               # Returns the installed unwritten
-v                                      # version.

Configuration

You can configure how your documentation will be rendered using a configuration file. The simplest way to create such a configuration file is by using the following command:

unwritten init

This will create a .unwritten.json file in the current working directory with the default configuration. You can change or remove any of the options in the configuration file.