0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/deno2/js/run_node.py
2018-06-12 03:59:04 +02:00

18 lines
382 B
Python
Executable file

#!/usr/bin/env python
"""
gn can only run python scripts.
"""
import subprocess
import sys
import os
js_path = os.path.dirname(os.path.realpath(__file__))
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))