summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/lint.py3
-rwxr-xr-xtools/run_node.py7
2 files changed, 4 insertions, 6 deletions
diff --git a/tools/lint.py b/tools/lint.py
index 94b79739c..4c38d3c69 100755
--- a/tools/lint.py
+++ b/tools/lint.py
@@ -4,11 +4,10 @@
import os
import sys
-from util import enable_ansi_colors, run, find_exts
+from util import enable_ansi_colors, find_exts, root_path, run
enable_ansi_colors()
-root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
third_party_path = os.path.join(root_path, "third_party")
cpplint = os.path.join(third_party_path, "cpplint", "cpplint.py")
tslint = os.path.join(third_party_path, "node_modules", "tslint", "bin",
diff --git a/tools/run_node.py b/tools/run_node.py
index 4023f7586..f1221bcd4 100755
--- a/tools/run_node.py
+++ b/tools/run_node.py
@@ -8,13 +8,12 @@ Before running node, we symlink js/node_modules to out/Debug/node_modules.
import subprocess
import sys
import os
-import util
+from util import remove_and_symlink, root_path, run
-root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
tools_path = os.path.join(root_path, "tools")
third_party_path = os.path.join(root_path, "third_party")
target_abs = os.path.join(third_party_path, "node_modules")
target_rel = os.path.relpath(target_abs)
-util.remove_and_symlink(target_rel, "node_modules", True)
-util.run(["node"] + sys.argv[1:], quiet=True)
+remove_and_symlink(target_rel, "node_modules", True)
+run(["node"] + sys.argv[1:], quiet=True)