Skip to content

Commit a2db630

Browse files
author
Martynas Žilinskas
committed
v0.1.0
1 parent 74c563c commit a2db630

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

packages/ts-docs-gen/README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
# ts-docs-gen
1+
# ts-docs-gen
2+
3+
_Readme is WIP._
4+
5+
Generates documentation from TypeScript files.
6+
7+
## Get started
8+
```sh
9+
npm install ts-docs-gen -g
10+
```
11+
12+
## CLI usage
13+
```sh
14+
ts-docs-gen -h
15+
```
16+
17+
### Examples
18+
19+
#### Without config
20+
21+
If you want to use `ts-docs-gen` without config file, `entryFile` flag is required.
22+
```
23+
ts-docs-gen --entryFile ./src/index.ts
24+
```
25+
26+
Multiple entry files:
27+
```
28+
ts-docs-gen --entryFile ./src/index.ts --entryFile ./src/internal.ts
29+
```
30+
31+
#### With config
32+
33+
```
34+
ts-docs-gen --config ./docs-gen.json
35+
```
36+
37+
## Configuration
38+
JSON config properties and CLI flags.
39+
40+
| Property | CLI Flag | Required | Type | Default | Description |
41+
|-------------|-------------------|------------|----------|---------------------------|--------------------------------------------|
42+
| `entryFile` | `--entryFile` | _required_ | string[] | | TypeScript project entry files. |
43+
| `project` | `--project`, `-p` | _optional_ | string | Current working directory | Full path to TypeScript project directory. |
44+
| `output` | `--output`, `-o` | _optional_ | string | ./docs/api/ | Documentation output directory. |
45+
| `plugin` | `--plugin` | _optional_ | string[] | | Packagename or path to plugin. |

packages/ts-docs-gen/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "ts-docs-gen",
33
"version": "0.1.0",
44
"description": "Generating documentation for TypeScript code",
5-
"main": "index.js",
5+
"main": "./dist/index.js",
6+
"typings": "./dist/index.d.ts",
67
"scripts": {
78
"pretest": "npm run build -- --noEmit && npm run build-tests",
89
"test": "npm run tslint && jest && echo All tests passed successfully.",

0 commit comments

Comments
 (0)