<commit_before>/**
 * React Starter Kit (https://www.reactstarterkit.com/)
 *
 * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */

import path from 'path';
import chokidar from 'chokidar';
import { writeFile, copyFile, makeDir, copyDir, cleanDir } from './lib/fs';
import pkg from '../package.json';
import { format } from './run';

/**
 * Copies static files such as robots.txt, favicon.ico to the
 * output (build) folder.
 */
async function copy() {
  await makeDir('build');
  await makeDir('build/avatars');
  await makeDir('build/emails');
  await copyDir('public', 'build/public');

  await Promise.all([
    writeFile(
      'build/package.json',
      JSON.stringify(
        {
          private: true,
          engines: pkg.engines,
          dependencies: pkg.dependencies,
          scripts: {
            start: 'node server.js',
          },
        },
        null,
        2,
      ),
    ),
    copyFile('LICENSE.txt', 'build/LICENSE.txt'),
    copyFile('yarn.lock', 'build/yarn.lock'),
    copyDir('src/messages', 'build/messages'),

    copyDir('src/data/db', 'build/db'),
    copyFile('.env.defaults', 'build/.env.defaults'),
    copyFile('src/core/serviceworker.js', 'build/public/serviceworker.js'),
  ]);

  wait copyFile('src/config.js', 'build/db/config.js'),
  await copyFile('src/knexfile.js', 'build/db/knexfile.js');
  await copyFile(
    'src/emails/translations.json',
    'build/emails/translations.json',
  );<commit_msg>fixed syntax error<commit_after>/**
 * React Starter Kit (https://www.reactstarterkit.com/)
 *
 * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */

import path from 'path';
import chokidar from 'chokidar';
import { writeFile, copyFile, makeDir, copyDir, cleanDir } from './lib/fs';
import pkg from '../package.json';
import { format } from './run';

/**
 * Copies static files such as robots.txt, favicon.ico to the
 * output (build) folder.
 */
async function copy() {
  await makeDir('build');
  await makeDir('build/avatars');
  await makeDir('build/emails');
  await copyDir('public', 'build/public');

  await Promise.all([
    writeFile(
      'build/package.json',
      JSON.stringify(
        {
          private: true,
          engines: pkg.engines,
          dependencies: pkg.dependencies,
          scripts: {
            start: 'node server.js',
          },
        },
        null,
        2,
      ),
    ),
    copyFile('LICENSE.txt', 'build/LICENSE.txt'),
    copyFile('yarn.lock', 'build/yarn.lock'),
    copyDir('src/messages', 'build/messages'),

    copyDir('src/data/db', 'build/db'),
    copyFile('.env.defaults', 'build/.env.defaults'),
    copyFile('src/core/serviceworker.js', 'build/public/serviceworker.js'),
  ]);

  await copyFile('src/config.js', 'build/db/config.js');
  await copyFile('src/knexfile.js', 'build/db/knexfile.js');
  await copyFile(
    'src/emails/translations.json',
    'build/emails/translations.json',
  );
{'fraction_non_alphanumeric': 0.15805849408836342, 'fraction_numerical': 0.0031113876789047915, 'mean_word_length': 2.9447852760736195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '7506156', 'n_tokens_mistral': 1025, 'n_tokens_neox': 1013, 'n_words': 246}