https://github.com/mdvanes/typescript-batch-compiler
usecase: a batch, in contrast to a project, of ts files that must be watched and compiled. These all have individual scopes, for example see this blog post about Polymer 2 with TypeScript.
https://github.com/mdvanes/typescript-batch-compiler
Last synced: 4 months ago
JSON representation
usecase: a batch, in contrast to a project, of ts files that must be watched and compiled. These all have individual scopes, for example see this blog post about Polymer 2 with TypeScript.
- Host: GitHub
- URL: https://github.com/mdvanes/typescript-batch-compiler
- Owner: mdvanes
- License: mit
- Created: 2017-11-04T13:49:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-20T07:28:31.000Z (over 3 years ago)
- Last Synced: 2025-07-28T03:44:46.987Z (5 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/typescript-batch-compiler)
# typescript-batch-compiler
> usecase: a batch, in contrast to a project, of ts files that must be watched and compiled. These all have individual scopes, for example see this blog post about Polymer 2 with TypeScript.
**work in progress**
Essentially, this is a wrapper around [node-typescript-compiler]() that watches TypeScript files in a directory
and runs the TypeScript compiler when one of the files changes with one important distinction from the normal compiler:
the files are not considered to be in each others scope.
This is particularly convenient when building Polymer 2 components with TypeScript. Each TypeScript file is scoped by its
Polymer component and are not one shared project. For more information
read [this article](https://github.com/mdvanes/polygram/blob/TypeScript/BLOG.md) (work in progress).
Supports TSLint.
# Installation
`npm i -g typescript-batch-compiler typescript`
Expects a tslint.json in the root of the project.
Run with `typescript-batch-compiler`.
If installed in project scope with `npm i typescript-batch-compiler typescript` run with `./node_modules/.bin/typescript-batch-compiler`
flags:
* `-v` logs the version
# Development
Run `node index.js`.