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

19 lines
382 B
Python
Raw Normal View History

#!/usr/bin/env python
"""
gn can only run python scripts.
"""
import subprocess
import sys
import os
2018-06-11 21:54:55 -04:00
js_path = os.path.dirname(os.path.realpath(__file__))
2018-06-11 21:54:55 -04:00
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))