@jterrazz/typescript 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/typescript.sh +17 -6
- package/package.json +1 -1
package/bin/typescript.sh
CHANGED
|
@@ -27,12 +27,23 @@ done
|
|
|
27
27
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
|
28
28
|
PACKAGE_ROOT="$SCRIPT_DIR/.."
|
|
29
29
|
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
# Find binaries - check package's node_modules first, then project's (handles npm hoisting)
|
|
31
|
+
find_binary() {
|
|
32
|
+
local name="$1"
|
|
33
|
+
if [ -x "$PACKAGE_ROOT/node_modules/.bin/$name" ]; then
|
|
34
|
+
echo "$PACKAGE_ROOT/node_modules/.bin/$name"
|
|
35
|
+
elif [ -x "$PROJECT_ROOT/node_modules/.bin/$name" ]; then
|
|
36
|
+
echo "$PROJECT_ROOT/node_modules/.bin/$name"
|
|
37
|
+
else
|
|
38
|
+
echo "$name" # Fallback to PATH
|
|
39
|
+
fi
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
ROLLDOWN=$(find_binary rolldown)
|
|
43
|
+
NODEMON=$(find_binary nodemon)
|
|
44
|
+
|
|
45
|
+
# Add both bin directories to PATH so plugins can find binaries like tsgo
|
|
46
|
+
export PATH="$PACKAGE_ROOT/node_modules/.bin:$PROJECT_ROOT/node_modules/.bin:$PATH"
|
|
36
47
|
|
|
37
48
|
# Parse command
|
|
38
49
|
COMMAND="$1"
|