0.0.1 • Published 6 years ago
glob-tsc v0.0.1
glob-tsc
The purpose of this command is to add support for file globbing to Typescript compiler tsc.
Globs can be provided by:
- Reading
filesGlobproperty of tsconfig.json - Providing it through command line arguments
All options not supported by this package will be passed to tsc compiler command
based on: tsc-glob version 1.1.0
Installation
Install the package
npm install --save-dev glob-tscUsage
glob-tsc [options]Options
| alias | command | description |
|---|---|---|
| -h | --help | output usage information |
| -V | --version | output the version number |
| -f | --tsconfig-file | tsconfig.json file location. Default ./tsconfig.json |
| -g | --files-glob | File globs (ignores filesGlob in tsconfig file) |
Examples
Using command globs with -g alias (easiest):
glob-tsc --outDir dist --declaration -g src/**/ts/*.tsfor JavaScript type linting (see JavaScript type linting on Medium):
glob-tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es5 -g bin/**/*.js,lib/**/*.js,test/**/*.jsUsing alternative tsconfig JSON file:
glob-tsc --tsconfig-file config/tsconfig.json --outDir dist --declarationUsing command globs with --files-globs:
glob-tsc --files-globs src/**/ts/*.ts --outDir dist --declarationMajor TODO items
- package "main" script should export some kind of a library API
- cleaner & clearer log output
- cleaner error reporting in the following cases:
- no file globs or tsconfig.json file present
- no valid tsc (TypeScript compiler) is found
0.0.1
6 years ago