| #!/usr/bin/env python3 | |
| # Copyright 2019 The Chromium OS Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| """Run npm with the right settings.""" | |
| import sys | |
| import libdot | |
| def run(cmd, **kwargs): | |
| """Run the npm |cmd|.""" | |
| libdot.node.run(['npm'] + cmd, **kwargs) | |
| def main(argv): | |
| """The main func!""" | |
| libdot.setup_logging() | |
| libdot.node_and_npm_setup() | |
| run(argv) | |
| if __name__ == '__main__': | |
| sys.exit(main(sys.argv[1:])) |