Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1230)

Unified Diff: third_party/node/node_modules.py

Issue 2638383006: WebUI: Add helper scripts for referring to node and node_modules paths. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/node/node.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/node/node_modules.py
diff --git a/third_party/node/node_modules.py b/third_party/node/node_modules.py
new file mode 100755
index 0000000000000000000000000000000000000000..821353e28c2982a3269de43adb87fc4512a3d86a
--- /dev/null
+++ b/third_party/node/node_modules.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from os import path as os_path
+
+
+_THIRD_PARTY_NODE_DIR = os_path.join(os_path.dirname(__file__))
+
+
+_THIRD_PARTY_NODE_MODULES_DIR = os_path.join(
+ _THIRD_PARTY_NODE_DIR, 'node_modules')
+
+def _get_binary(*args):
+ return os_path.join(_THIRD_PARTY_NODE_MODULES_DIR, *args)
+
+def get_vulcanize_binary():
+ return _get_binary('vulcanize', 'bin', 'vulcanize')
+
+def get_crisper_binary():
+ return _get_binary('crisper', 'bin', 'crisper')
+
+def get_polymer_css_build_binary():
+ return _get_binary('polymer-css-build', 'bin', 'polymer-css-build')
+
+def get_uglifyjs_binary():
+ return _get_binary('uglifyjs', 'bin', 'uglifyjs')
« no previous file with comments | « third_party/node/node.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698