Skip to content

Commit

Permalink
Add documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrv committed Mar 29, 2016
1 parent bd7d5b9 commit bc46425
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ docts
[![build status](https://travis-ci.org/charto/docts.svg?branch=master)](http://travis-ci.org/charto/docts)
[![npm version](https://img.shields.io/npm/v/docts.svg)](https://www.npmjs.com/package/docts)

This is a command-line tool to generate API documentation for TypeScript projects
based on information about types and exported declarations extracted using [readts](https://github.com/charto/readts).
Run `docts` inside your package and it parses the `.d.ts` files referenced from the `typings` key of your `package.json`.
Then it replaces any section titled `API` in your `README.md` file with new automatically generated content.
For an example of its output, see the [API](#api) section below.

Any additional TypeScript configuration should be defined in `tsconfig.json` in the root if your package.

Usage
-----

Start by making a backup of your `README.md`.

Then install:

```sh
npm install --save docts
```

Make sure your `package.json` has a `typings` section and add in the `scripts` section:

```json
"scripts": {
"docts": "docts"
}
```

Finally run:

```sh
npm run docts
```

API
===

Expand Down

0 comments on commit bc46425

Please sign in to comment.