tsc-then
Run tsc -w, then another command after.
Last updated 3 years ago by polymer .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tsc-then 
SYNC missed versions from official npm registry.

tsc-then

tsc -w will watch the filesystem and recompile your code almost instantly. Wouldn't you like to be able to run a command after it's done compiling? Like run your tests?

tsc-then is a super simple command that will run tsc -w and run a specified command after tsc -w is finished. It's ok if your command takes much longer than compiling, it will wait until the last run of your command is finished before starting the next one.

Because I'm generally editing with a smart editor that gives me inline errors, I left typescript's error reporting out of the console output, but this may change or become an option in a future version.

Example Usage

tsc-then -- npx mocha

This runs typescript's tsc -w, and each time compilation finishes, it runs the command npx mocha. It passes the stdout and stderr of npx mocha through, as well as some lines to delineate one run of the command from the next.

Multiple projects

Pass in -p to specify a project directory or config file, the same as the -p argument to tsc. Pass it in multiple times, and tsc-then will run multiple tsc -w processes, one for each project, and it will first wait for all of them to compile, run your script, then it will run your script after any of them changes.

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

3 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 1
This Week 5
This Month 40
Last Day 2
Last Week 11
Last Month 38
Dependencies (2)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |