<commit_before>#!/usr/bin/env node

'use strict';

/**
 * @license
 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 */
process.title = 'polymer';

const resolve = require('resolve');
const updateNotifier = require('update-notifier');
const packageJson = require('../package.json');

// Update Notifier: Asynchronously check for package updates and, if needed,
// notify on the next time the CLI is run.
// See https://github.com/yeoman/update-notifier#how for how this works.
updateNotifier({pkg: packageJson}).notify();

resolve('polymer-cli', {basedir: process.cwd()}, function(error, path) {
  let lib = path ? require(path) : require('..');
  let args = process.argv.slice(2);
  let cli = new lib.PolymerCli(args);
  cli.run();
});<commit_msg>Send an error code on polymer command run error<commit_after>#!/usr/bin/env node

'use strict';

/**
 * @license
 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 */
process.title = 'polymer';

const resolve = require('resolve');
const updateNotifier = require('update-notifier');
const packageJson = require('../package.json');

// Update Notifier: Asynchronously check for package updates and, if needed,
// notify on the next time the CLI is run.
// See https://github.com/yeoman/update-notifier#how for how this works.
updateNotifier({pkg: packageJson}).notify();

resolve('polymer-cli', {basedir: process.cwd()}, function(error, path) {
  let lib = path ? require(path) : require('..');
  let args = process.argv.slice(2);
  let cli = new lib.PolymerCli(args);
  cli.run()
  .then(null, () => process.exit(1));
});
{'fraction_non_alphanumeric': 0.131062124248497, 'fraction_numerical': 0.004408817635270541, 'mean_word_length': 4.232704402515723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4174998', 'n_tokens_mistral': 747, 'n_tokens_neox': 707, 'n_words': 264}