| 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
|
| +import platform
|
| +
|
| +_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
|
|
|