diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-06-10 00:32:04 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-06-10 01:02:08 +0200 |
commit | 110ddab670cbf477488cceeea2842c980942d7b8 (patch) | |
tree | 6bc1e6dd42f01b98f302e97b4dd4dbb3a7be700d /deno2/js/run_node.py | |
parent | fe9ea6dcf8f57cff5c3856a5d54e8f9c8236a924 (diff) |
Add deno2 prototype from external repo.
Diffstat (limited to 'deno2/js/run_node.py')
-rwxr-xr-x | deno2/js/run_node.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deno2/js/run_node.py b/deno2/js/run_node.py new file mode 100755 index 000000000..1cf74e692 --- /dev/null +++ b/deno2/js/run_node.py @@ -0,0 +1,14 @@ +#!/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) +args = ["node"] + sys.argv[1:] +sys.exit(subprocess.call(args)) |