<commit_before>'use strict';

const process = require('process');
const webpack = require('webpack');
const path = require('path');
const buildPath = path.resolve(__dirname, 'static');
const nodeModulesPath = path.resolve(__dirname, 'node_modules');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const TransferWebpackPlugin = require('transfer-webpack-plugin'); // dev-server only

var devtool = 'source-map'; // Render source-map file for final build
var plugins = [
  new CopyWebpackPlugin([
    { context: 'frontend', from: '**/*.css' },
    { context: 'frontend', from: '**/*.html' },
    { context: 'frontend', from: '**/*.png' },
    { context: 'frontend', from: '**/*.jpg' },
    { context: 'frontend', from: '**/*.svg' },
    { context: nodeModulesPath, from: 'bootstrap/dist/**', to: 'lib' },
    { context: nodeModulesPath, from: 'bootswatch/**', to: 'lib' },
    { context: nodeModulesPath, from: 'jquery/dist/**', to: 'lib' },
    { context: nodeModulesPath, from: 'react/umd/**', to: 'lib' },
    { context: nodeModulesPath, from: 'react-dom/umd/**', to: 'lib' },
  ])
];

if (process.env.WEBPACK_DEV_SERVER === 'true') {
  console.log('WEBPACK_DEV_SERVER is true');
  devtool = 'eval';
  plugins.push(
    new TransferWebpackPlugin([
      {from: 'css'},
      {from: 'html'},
      {from: 'image'},
      {from: nodeModulesPath + "/bootstrap", to: 'lib'},
      {from: nodeModulesPath + "/bootswatch", to: 'lib'},
      {from: nodeModulesPath + "/jquery", to: 'lib'},
      {from: nodeModulesPath + "/react", to: 'lib'},
      {from: nodeModulesPath + "/react-dom", to: 'lib'},
    ], path.resolve(__dirname, "frontend"))
  );
}

const config = {
  mode: process.env.MINIFY === 'true' ? 'production' : 'development',
  entry: {
    main: './frontend/js/main.js',
    setting: './frontend/js/setting.js',
  },
  resolve: {<commit_msg>Copy only yeti to static dir<commit_after>'use strict';

const process = require('process');
const webpack = require('webpack');
const path = require('path');
const buildPath = path.resolve(__dirname, 'static');
const nodeModulesPath = path.resolve(__dirname, 'node_modules');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const TransferWebpackPlugin = require('transfer-webpack-plugin'); // dev-server only

var devtool = 'source-map'; // Render source-map file for final build
var plugins = [
  new CopyWebpackPlugin([
    { context: 'frontend', from: '**/*.css' },
    { context: 'frontend', from: '**/*.html' },
    { context: 'frontend', from: '**/*.png' },
    { context: 'frontend', from: '**/*.jpg' },
    { context: 'frontend', from: '**/*.svg' },
    { context: nodeModulesPath, from: 'bootstrap/dist/**', to: 'lib' },
    { context: nodeModulesPath, from: 'bootswatch/dist/yeti/**', to: 'lib' },
    { context: nodeModulesPath, from: 'jquery/dist/**', to: 'lib' },
    { context: nodeModulesPath, from: 'react/umd/**', to: 'lib' },
    { context: nodeModulesPath, from: 'react-dom/umd/**', to: 'lib' },
  ])
];

if (process.env.WEBPACK_DEV_SERVER === 'true') {
  console.log('WEBPACK_DEV_SERVER is true');
  devtool = 'eval';
  plugins.push(
    new TransferWebpackPlugin([
      {from: 'css'},
      {from: 'html'},
      {from: 'image'},
      {from: nodeModulesPath + "/bootstrap", to: 'lib'},
      {from: nodeModulesPath + "/bootswatch", to: 'lib'},
      {from: nodeModulesPath + "/jquery", to: 'lib'},
      {from: nodeModulesPath + "/react", to: 'lib'},
      {from: nodeModulesPath + "/react-dom", to: 'lib'},
    ], path.resolve(__dirname, "frontend"))
  );
}

const config = {
  mode: process.env.MINIFY === 'true' ? 'production' : 'development',
  entry: {
    main: './frontend/js/main.js',
    setting: './frontend/js/setting.js',
  },
  resolve: {
{'fraction_non_alphanumeric': 0.20667556742323098, 'fraction_numerical': 0.0, 'mean_word_length': 3.839793281653747, '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': '5958743', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1251, 'n_words': 299}