diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-06-12 03:54:55 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-06-12 03:59:04 +0200 |
commit | b3003535bebf852c3233cab272424feac164a3d0 (patch) | |
tree | b41fda724f8f00b2b1266f7fcd2728a8f58c8c78 /deno2/js/run_node.py | |
parent | 356fd18c7385f99766fe1e8d843ec85712bbaf76 (diff) |
deno2: compile in TS, build protobuf
Diffstat (limited to 'deno2/js/run_node.py')
-rwxr-xr-x | deno2/js/run_node.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deno2/js/run_node.py b/deno2/js/run_node.py index 1cf74e692..1a1dc5cc7 100755 --- a/deno2/js/run_node.py +++ b/deno2/js/run_node.py @@ -1,14 +1,18 @@ #!/usr/bin/env python """ gn can only run python scripts. -Also Node programs except to be run with cwd = $root_dir/js so it can resolve -node_modules. """ import subprocess import sys import os + js_path = os.path.dirname(os.path.realpath(__file__)) -os.chdir(js_path) +node_modules_path = os.path.join(js_path, "node_modules") + +# root_out_dir +if not os.path.exists("node_modules"): + os.symlink(node_modules_path, "node_modules") + args = ["node"] + sys.argv[1:] sys.exit(subprocess.call(args)) |