Skip to content

Commit

Permalink
Modify run script so more complex flags can be passed to ts-node
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimitroulas committed Jun 5, 2020
1 parent e5fba66 commit 3505e29
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions scripts/run.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import path from "path";
import spawn from "cross-spawn";

import { appDirectory } from "./utils";

const args = process.argv.slice(3);

function run(): number {
const result = spawn.sync(
path.join(appDirectory, "./node_modules/.bin/ts-node"),
args,
{ stdio: "inherit" }
);
const result = spawn.sync("node", ["-r", "ts-node/register", ...args], {
stdio: "inherit"
});

if (result.error) {
console.error(result.error);
Expand Down

0 comments on commit 3505e29

Please sign in to comment.