summaryrefslogtreecommitdiff
path: root/deno2/js/run_node.py
blob: 1a1dc5cc715c42dc8eac29aa8cf6fcae90270f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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))