UNPKG

985 BPlain TextView Raw
1#!/usr/bin/env node
2/**
3 * @license
4 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
5 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8 * Code distributed by Google as part of the polymer project is also
9 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10 */
11var resolve = require('resolve');
12
13process.title = 'wct-st';
14
15resolve('web-component-tester', {basedir: process.cwd()}, function(error, path) {
16 var wct = path ? require(path) : require('..');
17 var promise = wct.cli.runSauceTunnel(process.env, process.argv.slice(2), process.stdout, function (error) {
18 process.exit(error ? 1 : 0);
19 });
20 if (promise) {
21 promise.then(() => process.exit(0), () => process.exit(1));
22 }
23});