blob: 35ad2c9663c500e0b8e7c0165d14ce59fa19c324 [file] [log] [blame]
# 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.
"""
Thin wrapper around the local node.js installed as part of chromium DEPS
"""
from os import path
import sys
SCRIPTS_PATH = path.dirname(path.abspath(__file__))
THIRD_PARTY_PATH = path.join(SCRIPTS_PATH, '..', '..', '..', '..')
NODE_PATH = path.join(THIRD_PARTY_PATH, 'node')
ESLINT_PATH = path.join(THIRD_PARTY_PATH, 'devtools-node-modules', 'third_party', 'node_modules', 'eslint', 'bin', 'eslint.js')
try:
old_sys_path = sys.path[:]
sys.path.append(NODE_PATH)
import node
finally:
sys.path = old_sys_path
def node_path():
return node.GetBinaryPath()
def eslint_path():
return ESLINT_PATH