Skip to content

Commit

Permalink
Add examples & update descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Brody committed Oct 29, 2019
1 parent d34d83a commit 1970311
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,28 @@ glob-tsc [options]
| -h | --help | output usage information |
| -V | --version | output the version number |
| -f | --tsconfig-file <path> | tsconfig.json file location. Default ./tsconfig.json |
| -g | --files-glob <globs> | File globs |
| -g | --files-glob <globs> | File globs (ignores filesGlob in tsconfig file) |

## Examples

Using alternative tsconfig.json file
Using command globs with `-g` alias (easiest):

```bash
glob-tsc --outDir dist --declaration -g src/**/ts/*.ts
```

for JavaScript type linting (see [JavaScript type linting on Medium](https://medium.com/@trukrs/javascript-type-linting-5903e9e3625f)):

```bash
glob-tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es5 -g bin/**/*.js,lib/**/*.js,test/**/*.js
```

Using alternative tsconfig JSON file:
```bash
glob-tsc --tsconfig-file config/tsconfig.json --outDir dist --declaration
```

Using command globs (ignores tsconfig.json filesGlob)
Using command globs with `--files-globs`:
```bash
glob-tsc --files-globs src/**/ts/*.ts --outDir dist --declaration
```
Expand Down

0 comments on commit 1970311

Please sign in to comment.