Skip to content

Commit 3505e29

Browse files
committed
Modify run script so more complex flags can be passed to ts-node
1 parent e5fba66 commit 3505e29

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

scripts/run.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import path from "path";
21
import spawn from "cross-spawn";
32

4-
import { appDirectory } from "./utils";
5-
63
const args = process.argv.slice(3);
74

85
function run(): number {
9-
const result = spawn.sync(
10-
path.join(appDirectory, "./node_modules/.bin/ts-node"),
11-
args,
12-
{ stdio: "inherit" }
13-
);
6+
const result = spawn.sync("node", ["-r", "ts-node/register", ...args], {
7+
stdio: "inherit"
8+
});
149

1510
if (result.error) {
1611
console.error(result.error);

0 commit comments

Comments
 (0)