Skip to content

Spawns a watch process for each tsconfig.json file in your project. 🐘

Notifications You must be signed in to change notification settings

ORESoftware/tsc-multi-watch

Repository files navigation

tsc-multi-watch

Spawns a watch process for each tsconfig.json file in the search root. The process is:

cd '${tsconfDir}' && tsc --project '${p}' --pretty false --preserveWatchOutput --watch

Installation

$ npm install -g tsc-multi-watch`

CLI

$ tsc_multi_watch --root="$(pwd)"  # --root defaults to $PWD, so this is redundant

Programmatic API

import tscmw from 'tsc-multi-watch';

tscmw(opts, (err, v) => {
  // v shows which paths are being watched
});

Here is the regex currently beign used to find tsconfig.json files:

  if (String(item).match(/^tsconfig.*\.json$/)) {
       tsConfigPaths.push(fullPath);
  }