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

Unified Diff: third_party/node/node.py

Issue 2569283002: WebUI: Add GN rules for Vulcanize. (Closed)
Patch Set: Rename 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
Index: third_party/node/node.py
diff --git a/third_party/node/node.py b/third_party/node/node.py
new file mode 100755
index 0000000000000000000000000000000000000000..a52e2abab6018e13ca2d1022b6e9d45bb59b39d8
--- /dev/null
+++ b/third_party/node/node.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# Copyright 2016 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.
+
+import os
Dan Beam 2017/01/20 01:03:07 nit: from os import path as os_path
dpapad 2017/01/20 01:51:50 Done.
+import platform
+
Dan Beam 2017/01/20 01:03:07 \n\n between file-level globals
dpapad 2017/01/20 01:51:50 Done.
+_THIRD_PARTY_NODE_DIR = os.path.join(os.path.dirname(__file__))
+
+# Gets the path to the Node binary based on current platform.
+def get_binary():
+ third_party_node_binary = '';
+
+ if platform.system() == 'Darwin':
+ third_party_node_binary = os.path.join(
+ 'mac', 'node-darwin-x64', 'bin', 'node')
+ elif platform.system() == 'Linux':
+ third_party_node_binary = os.path.join(
+ 'linux', 'node-linux-x64', 'bin', 'node')
+ elif platform.system() == 'Windows':
+ third_party_node_binary = os.path.join('win', 'node.exe')
+
+ return os.path.abspath(os.path.join(
+ _THIRD_PARTY_NODE_DIR, third_party_node_binary))
+
+if __name__ == '__main__':
+ pass
Dan Beam 2017/01/20 01:03:07 what's the point of this? could we remove it or m
dpapad 2017/01/20 01:51:50 Removed. I'll defer adding a main until it is need

Powered by Google App Engine
This is Rietveld 408576698