<commit_before>#!/usr/bin/env node
import { echo, exec, exit } from 'shelljs';
echo(process.cwd());

const buildApplication = 'npm run build:dist';
if (exec(buildApplication).code !== 0) {
  echo('Error: build:dist error.');
  exit(1);
}

const cleanOutPutPath = 'node node_modules/rimraf/bin.js ./output';
if (exec(cleanOutPutPath).code !== 0) {
  echo('Error: clean output error.');
  exit(1);
}

const nodeWebkitBuilder = 'node node_modules/node-webkit-builder/bin/nwbuild'+
  ' -v "0.12.2"' +
  ' -p "win32,win64,osx32,osx64,linux32,linux64"' +
  ' ./dist' +
  ' -o ./output';
if (exec(nodeWebkitBuilder).code !== 0) {
  echo('Error: nwbuild error.');
  exit(1);
}
<commit_msg>chore(nwjs-pack): extract variable<commit_after>#!/usr/bin/env node
import { echo, exec, exit } from 'shelljs';
echo(process.cwd());

const buildApplication = 'npm run build:dist';
if (exec(buildApplication).code !== 0) {
  echo('Error: build:dist error.');
  exit(1);
}

const cleanOutPutPath = 'node node_modules/rimraf/bin.js ./output';
if (exec(cleanOutPutPath).code !== 0) {
  echo('Error: clean output error.');
  exit(1);
}

const nwjsVersion = '0.12.2';
const buildTarget = ['win32', 'win64', 'osx32', 'osx64', 'linux32', 'linux64'];
const nodeWebkitBuilder = 'node node_modules/node-webkit-builder/bin/nwbuild'+
  ` -v '${nwjsVersion}'` +
  ` -p '${buildTarget.join(',')}'` +
  ' ./dist' +
  ' -o ./output';
if (exec(nodeWebkitBuilder).code !== 0) {
  echo('Error: nwbuild error.');
  exit(1);
}

{'fraction_non_alphanumeric': 0.20592193808882908, 'fraction_numerical': 0.029609690444145357, 'mean_word_length': 4.548507462686567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4070376', 'n_tokens_mistral': 585, 'n_tokens_neox': 558, 'n_words': 117}