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

import fs from 'fs-extra'
import colors from 'colors'

import { isSite, exists } from '../lib/etc'
import config from '../lib/config'

if (!isSite()) {
  console.error('No site in here!'.red)
  process.exit(1)
}

if (!exists(config.outputDir)) {
  console.error('There\'s a site in here, but it hasn\'t been built yet.')
  console.error('Run ' + 'cory build'.gray + ' to build it.')

  process.exit(1)
}

etc.deleteDir(config.outputDir, false, () => console.log('Everything cleaned up!'.green))<commit_msg>Use fs-extra to remove outputDir<commit_after>#!/usr/bin/env node

import fs from 'fs-extra'
import colors from 'colors'

import { exists, isSite, deleteDir } from '../lib/etc'
import config from '../lib/config'

if (!isSite()) {
  console.error('No site in here!'.red)
  process.exit(1)
}

if (!exists(config.outputDir)) {
  console.error('There\'s a site in here, but it hasn\'t been built yet.')
  console.error('Run ' + 'cory build'.gray + ' to build it.')

  process.exit(1)
}

fs.remove(config.outputDir, err => {
  if (err) throw err
  console.log('Everything cleaned up!'.green)
})
{'fraction_non_alphanumeric': 0.17418213969938107, 'fraction_numerical': 0.0035366931918656055, 'mean_word_length': 3.9649122807017543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4839175', 'n_tokens_mistral': 395, 'n_tokens_neox': 388, 'n_words': 110}