| 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..9ac584179c67a28554d9fb0d5277d7f9ebc03c85
|
| --- /dev/null
|
| +++ b/third_party/node/node.py
|
| @@ -0,0 +1,26 @@
|
| +#!/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
|
| +from platform import system as platform_system
|
| +
|
| +
|
| +_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))
|
|
|