<commit_before># Multiple Typescript Compilers
_Run multiple typescript compilers concurrently at the same time. Usage: `mtsc [directories/tsconfigs...]` Example: `mtsc client server middleware/new_tsconfig.json`_

## Usage
### Cli:
`mtsc [directories/tsconfigs...]`

### Examples:
`./node_modules/.bin/mtsc client scripts/ide.tsconfig.json special/location`

`mtsc client scripts/ide.tsconfig.json special/location -w`

`mtsc -c client/tsconfig.json scripts/ide.tsconfig.json -w`

`mtsc -c node_modules/.bin/tsc client/tsconfig.json scripts/ide.tsconfig.json -w`

## Why?
I began this project because vscode can't handle the output of multiple typescript projects. If you have multiple projects watched at the same time, only the output of the last compilation will be considered and the other errors of other projects are hidden. This has to do, with the problem matcher vscode uses, explained here: https://code.visualstudio.com/docs/editor/tasks-v1#_background-watching-tasks

### How it was fixed:
This always prints the compilation output of the other projects when a new compilation is done. It also makes sure that the interpreter knows there is still a compilation going on by printing a compilation start message when there is still one running.

## Options
```
-d, --debug
-w, --watch                   Watch the given projects (default false)
-c, --compiler [path_to_tsc]  Path to compiler for all projects (will search in exec dir if not given)
-h, --help                    output usage information
```

## Vscode tasks json example
```json
{
  "version": "0.1.0",
  "tasks": [
    {
      "taskName": "Watch all",
      "command": "./node_modules/.bin/mtsc",
       "windows": {
        "command": ".\\node_modules\\.bin\\mtsc"
      },
      "isBuildCommand": true,
      "isShellCommand": true,
      "args": [
        "${workspaceRoot}/node_modules/.bin/tsc",
        "${workspaceRoot}/itest",
        "${workspaceRoot}/scripts/ts-scripts",
        "${workspaceRoot}/webModeler/server",
        "${workspaceRoot}/webModeler/client"
      ],
      "showOutput": "silent",
      "isBackground": true,
      "problemMatcher": "$tsc-watch"
    }
  ]
}
```

## Roadmap
* Add json config option
* Use vscode tasks 2.0 in example
* Add tslint option for each project(!)
* Specify specific options per project

---



<center>
<img src="https://www.mendix.com/styleguide/img/logo-mendix.png" align="center" width="200"/>

__Mtsc is proudly used for development at [Mendix](https://www.mendix.com)__
</center><commit_msg>Use tasks 2.0.0 in example<commit_after># Multiple Typescript Compilers
_Run multiple typescript compilers concurrently at the same time. Usage: `mtsc [directories/tsconfigs...]` Example: `mtsc client server middleware/new_tsconfig.json`_

## Usage
### Cli:
`mtsc [directories/tsconfigs...]`

### Examples:
`./node_modules/.bin/mtsc client scripts/ide.tsconfig.json special/location`

`mtsc client scripts/ide.tsconfig.json special/location -w`

`mtsc -c client/tsconfig.json scripts/ide.tsconfig.json -w`

`mtsc -c node_modules/.bin/tsc client/tsconfig.json scripts/ide.tsconfig.json -w`

## Why?
I began this project because vscode can't handle the output of multiple typescript projects. If you have multiple projects watched at the same time, only the output of the last compilation will be considered and the other errors of other projects are hidden. This has to do, with the problem matcher vscode uses, explained here: https://code.visualstudio.com/docs/editor/tasks-v1#_background-watching-tasks

### How it was fixed:
This always prints the compilation output of the other projects when a new compilation is done. It also makes sure that the interpreter knows there is still a compilation going on by printing a compilation start message when there is still one running.

## Options
```
-d, --debug
-w, --watch                   Watch the given projects (default false)
-c, --compiler [path_to_tsc]  Path to compiler for all projects (will search in exec dir if not given)
-h, --help                    output usage information
```

## Vscode tasks json example
```json
{
  "version": "2.0.0",
  "tasks": [
      {
          "label": "typescript",
          "type": "shell",
          "command": "./node_modules/.bin/mtsc",
          "windows": {
            "command": ".\\node_modules\\.bin\\mtsc"
          },
          "args": [
            "-w",
            "${workspaceRoot}/projectA",
            "${workspaceRoot}/scripts/projectB",
            "${workspaceRoot}/projectC/tsconfig.json"
          ],
          "isBackground": true,
          "problemMatcher": "$tsc-watch",
          "group": {
            "kind": "build",
            "isDefault": true
        }
      }
  ]
}
```

## Roadmap
* Add json config option
* Use vscode tasks 2.0 in example
* Add tslint option for each project(!)
* Specify specific options per project

---

<center>
<img src="https://www.mendix.com/styleguide/img/logo-mendix.png" align="center" width="200"/>

__Mtsc is proudly used for development at [Mendix](https://www.mendix.com)__
</center>
{'fraction_non_alphanumeric': 0.1235224586288416, 'fraction_numerical': 0.004137115839243499, 'mean_word_length': 3.1343648208469057, 'pattern_counts': {'":': 25, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1231858', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1485, 'n_words': 504}