From 9fe68adda01dd932b76b55f727edd8f42937b812 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 20 Oct 2025 14:52:41 +0530 Subject: Add makecmd setup for tsc --- scripts/tsc-vimgrep.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/tsc-vimgrep.sh (limited to 'scripts/tsc-vimgrep.sh') diff --git a/scripts/tsc-vimgrep.sh b/scripts/tsc-vimgrep.sh new file mode 100755 index 0000000..1db2013 --- /dev/null +++ b/scripts/tsc-vimgrep.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +set -e -o pipefail + +path="$1" + +args="--noEmit --pretty false" +if [ -d "$path" ]; then + args="$args -p $path" +elif [ -z "$path" ]; then + args="$args -p ." +else + args="$args $path" +fi + +tsc="npx tsc" +if [ -f ./node_modules/.bin/tsc ]; then + tsc="./node_modules/.bin/tsc"; +fi + +echo "running "$tsc" $args" +"$tsc" $args | sed -E 's/^([^(]+)\(([0-9]+),([0-9]+)\)\s*:\s*(.*)$/\1:\2:\3: \4/' || (echo "exited with $?"; exit $?) +echo "done" -- cgit v1.3.1