0.9.2 • Published 5 years ago

incremental-tsc v0.9.2

Weekly downloads
12
License
MIT
Repository
-
Last release
5 years ago

incremental-tsc

A small script to run tsc on a subset of project files, while respecting other settings from tsconfig.json and tsconfig.paths.json

Usage:

incremental-tsc src/components/*.tsx

As of v0.0.4, you can also pass a URL to the github API enpoint for a specific pull request and run the typechecker only on files changed in that PR. Use the flag --changed-lines-only to only report errors on lines touched by the PR. If the environment variables GITHUB_USER and GITHUB_PASSWORD are set, they will be used to authenticate the request.

incremental-tsc https://api.github.com/repos/<username>/<repo>/pulls/<prnum>/files --changed-lines-only

Running in CircleCI

Assuming you have suitable GITHUB_[USER|PASSWORD] environment variables set, the following bash script will run check only lines changed in the pr that CI is running in.

if [ -z "$CIRCLE_PULL_REQUEST" ]; then
    echo "Not in a Pull Request, skipping incremental-tsc check"
    exit 0
fi

BASE_URL=https://github.com/<owner>/<repo>/pull/
PR_NUM=${CIRCLE_PULL_REQUEST:${#BASE_URL}}
URL="https://api.github.com/repos/<owner>/<repo>/pulls/${PR_NUM}/files"
./node_modules/.bin/incremental-tsc --changed-lines-only "$URL"
0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago