1.0.19 • Published 3 years ago

ts-compile-checker v1.0.19

Weekly downloads
75
License
MIT
Repository
-
Last release
3 years ago

NPM! PRs welcome! Downloads License

Description

Managing a microservice architecture with multiple shared Typescript types quickly become cumbersome, if the compiler isn't watching the involed sub-projects.

This package solves those issues by:

  1. Recursively searching for tsconfig.json files in a specified directory
  2. Installing package.json dependencies
  3. Running the tsc compiler located in node_modules/.bin/tsc for each sub-project.

Usage

CLI

Npx

npx ts-compile-checker

Docker

docker run --rm -it -v $(pwd):/src:rw mkenney/npm:latest npx ts-compile-checker

Package.json script

{
  "dependencies": {
    "ts-compile-check": "^1.0.3",
  },
  "scripts": {
    "ts-compile-check": "node ts-compile-checker",
  }
}

Install and run

yarn add ts-compile-checker && yarn ts-compile-checker

Github Action

on: push
name: TS compilation check
jobs:
  checker:
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
      - run: npx ts-compile-checker
        working-directory: ./

Demo

Usage

Github Action

Options

FlagTypeDescription
--help, -hBooleanDisplay this usage guide.
--skip, -sBooleanSkipping the installation process.
--include, -iArrayPass your own set of project paths. This will skip the search process.
--exclude, -eArrayExcluding a set of project paths.
--options, -oArrayOverride the default options ["--noEmit", "--pretty"] passed to the tsc compiler for each sub-project
--cwd, -cStringCurrent working directory that the search process should be based on. Default directory is ..

License

This project is licensed under the terms of the MIT license. See the LICENSE file.

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago