<commit_before>/* eslint-disable */
require('shelljs/global');

/**
 * Adds mark check symbol
 */
function addCheckMark(callback) {
  process.stdout.write(' ✓');
  callback();
}

if (!which('git')) {
  echo('Sorry, this script requires git');
  exit(1);
}

if (!test('-e', 'internals/templates')) {
  echo('The example is deleted already.');
  exit(1);
}

process.stdout.write('Cleanup started...');

// Cleanup components folder
rm('-rf', 'app/components/*');

// Cleanup containers folder
rm('-rf', 'app/containers/*');
mkdir('app/containers/App');
mkdir('app/components/NotFoundPage');
mkdir('app/components/HomePage');
cp('internals/templates/appContainer.js', 'app/containers/App/index.js');
cp('internals/templates/notFoundPage.js', 'app/components/NotFoundPage/index.js');
cp('internals/templates/homePage.js', 'app/components/HomePage/index.js');

// Cleanup sagas folder
rm('-rf', 'app/sagas/*');
cp('internals/templates/sagas.js', 'app/sagas/index.js');

// Cleanup selectors folder, leave selectLocationSelection.js
rm('-Rf', 'app/selectors/tests');
rm('-f', [
  'app/selectors/currentUserSelector.js',
  'app/selectors/errorSelector.js',
  'app/selectors/globalSelector.js',
  'app/selectors/loadingSelector.js',
  'app/selectors/reposSelector.js',
  'app/selectors/routeSelector.js',
  'app/selectors/usernameSelector.js',
]);

// Delete utils folder
rm('-rf', 'app/utils');

// Replace app.js, index.html, rootReducer.js, routeReducer.js and routes.js
cp('internals/templates/app.js', 'app/app.js');
cp('internals/templates/index.html', 'app/index.html');
cp('internals/templates/rootReducer.js', 'app/rootReducer.js');
cp('internals/templates/routeReducer.js', 'app/routeReducer.js');
cp('internals/templates/routes.js', 'app/routes.js');

// Remove the templates folder
rm('-rf', 'internals/templates');

process.stdout.write(' ✓');

// Commit the changes
if (exec('git add . && git commit -qm "Remove default example"').code !== 0) {
  echo('\nError: Git commit failed');
  exit(1);
}
<commit_msg>Added selectLocationSelector.test.js to not be removed from npm run clean<commit_after>/* eslint-disable */
require('shelljs/global');

/**
 * Adds mark check symbol
 */
function addCheckMark(callback) {
  process.stdout.write(' ✓');
  callback();
}

if (!which('git')) {
  echo('Sorry, this script requires git');
  exit(1);
}

if (!test('-e', 'internals/templates')) {
  echo('The example is deleted already.');
  exit(1);
}

process.stdout.write('Cleanup started...');

// Cleanup components folder
rm('-rf', 'app/components/*');

// Cleanup containers folder
rm('-rf', 'app/containers/*');
mkdir('app/containers/App');
mkdir('app/components/NotFoundPage');
mkdir('app/components/HomePage');
cp('internals/templates/appContainer.js', 'app/containers/App/index.js');
cp('internals/templates/notFoundPage.js', 'app/components/NotFoundPage/index.js');
cp('internals/templates/homePage.js', 'app/components/HomePage/index.js');

// Cleanup sagas folder
rm('-rf', 'app/sagas/*');
cp('internals/templates/sagas.js', 'app/sagas/index.js');

// Cleanup selectors folder, leave selectLocationSelection(.test).js
rm('-f', [
  'app/selectors/tests/currentUserSelector.test.js',
  'app/selectors/tests/errorSelector.test.js',
  'app/selectors/tests/globalSelector.test.js',
  'app/selectors/tests/loadingSelector.test.js',
  'app/selectors/tests/reposSelector.test.js',
  'app/selectors/tests/routeSelector.test.js',
  'app/selectors/tests/usernameSelector.test.js',
  'app/selectors/currentUserSelector.js',
  'app/selectors/errorSelector.js',
  'app/selectors/globalSelector.js',
  'app/selectors/loadingSelector.js',
  'app/selectors/reposSelector.js',
  'app/selectors/routeSelector.js',
  'app/selectors/usernameSelector.js',
]);

// Delete utils folder
rm('-rf', 'app/utils');

// Replace app.js, index.html, rootReducer.js, routeReducer.js and routes.js
cp('internals/templates/app.js', 'app/app.js');
cp('internals/templates/index.html', 'app/index.html');
cp('internals/templates/rootReducer.js', 'app/rootReducer.js');
cp('internals/templates/routeReducer.js', 'app/routeReducer.js');
cp('internals/templates/routes.js', 'app/routes.js');

// Remove the templates folder
rm('-rf', 'internals/templates');

process.stdout.write(' ✓');

// Commit the changes
if (exec('git add . && git commit -qm "Remove default example"').code !== 0) {
  echo('\nError: Git commit failed');
  exit(1);
}

{'fraction_non_alphanumeric': 0.19809177646524306, 'fraction_numerical': 0.001817355747387551, 'mean_word_length': 5.081491712707182, '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': '6058378', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1500, 'n_words': 254}