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

var fs = require('fs');
var path = require('path');

var shell = require('shelljs');
var root = require('app-root-path').toString();

var pkgPath = path.resolve(root, 'package.json');
var pkg = require(pkgPath);

var defaultTest = 'echo "Error: no test specified" && exit 1';
var hopsTest = 'mocha-webpack --reporter hops/reporter --webpack-config webpack.config.js \"src/**/*.test.js\"';

Object.assign(pkg, {
  main: (shell.test('-e', pkg.main)) ? pkg.main : 'src/main.js',
  scripts: Object.assign(
    {
      start: '[ "$NODE_ENV" != "production" ] && npm run watch || npm run build',
      watch: 'webpack-dev-server --hot --config webpack.config.js',
      build: 'webpack --progress --config webpack.config.js'
    },
    pkg.scripts,
    {
      test: (pkg.scripts.test === defaultTest) ? hopsTest : pkg.scripts.test
    }
  ),
  babel: Object.assign({ extends: 'hops/etc/babel' }, pkg.babel)
});

var srcDir = path.resolve(__dirname, '..', 'app');
var template = [{<commit_msg>fix setup (take #2)<commit_after>#!/usr/bin/env node

var fs = require('fs');
var path = require('path');

var shell = require('shelljs');
var root = require('app-root-path').toString();

var pkgPath = path.resolve(root, 'package.json');
var pkg = require(pkgPath);

var defaultTest = 'echo "Error: no test specified" && exit 1';
var hopsTest = 'mocha-webpack --reporter hops/reporter --webpack-config webpack.config.js "src/**/*.test.js"';

Object.assign(pkg, {
  main: (shell.test('-e', pkg.main)) ? pkg.main : 'src/main.js',
  scripts: Object.assign(
    {
      start: '[ "$NODE_ENV" != "production" ] && npm run watch || npm run build',
      watch: 'webpack-dev-server --hot --config webpack.config.js',
      build: 'webpack --progress --config webpack.config.js'
    },
    pkg.scripts,
    {
      test: (pkg.scripts.test === defaultTest) ? hopsTest : pkg.scripts.test
    }
  ),
  babel: Object.assign({ extends: 'hops/etc/babel' }, pkg.babel)
});

var srcDir = path.resolve(__dirname, '..', 'app');
var template = [{
{'fraction_non_alphanumeric': 0.19560975609756098, 'fraction_numerical': 0.0014634146341463415, 'mean_word_length': 3.4978070175438596, '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': '5578108', 'n_tokens_mistral': 719, 'n_tokens_neox': 679, 'n_words': 167}