blob: 86e7a15b08838d5e1b083c9194d389c28272ec9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env python
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
"""
gn can only run python scripts. This launches a subprocess Node process.
The working dir of this program is out/Debug/ (AKA root_build_dir)
Before running node, we symlink js/node_modules to out/Debug/node_modules.
"""
import sys
from os import path
from util import symlink, root_path, run
if not path.exists("node_modules"):
target_abs = path.join(root_path, "third_party/node_modules")
target_rel = path.relpath(target_abs)
symlink(target_rel, "node_modules", True)
run(["node"] + sys.argv[1:], quiet=True)
|