From 110ddab670cbf477488cceeea2842c980942d7b8 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 10 Jun 2018 00:32:04 +0200 Subject: Add deno2 prototype from external repo. --- deno2/js/run_node.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 deno2/js/run_node.py (limited to 'deno2/js/run_node.py') 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)) -- cgit v1.2.3