<commit_before>const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const postcssImport = require('postcss-import');

//Standard Node environment variables for determining if we are in PRODUCTION
//To enable / disable the hot module replacement.
const PRODUCTION = process.env.NODE_ENV === 'production';
const env = process.env.NODE_ENV || 'development';
const PORT = process.env.PORT || 8080;
const HOST = process.env.HOST || 'localhost'; // Set to 0.0.0.0 on cloud9 if needed
const URL = `http://${HOST}:${PORT}`

const TARGET = process.env.npm_lifecycle_event;
const PATHS = {
  app: path.join(__dirname, 'app'),
  build: path.join(__dirname, 'build'),
  public: path.join(__dirname, 'public'),
  images: path.join(__dirname, 'assets/images'),
  style: path.join(__dirname, 'app/stylesheets')
};

module.exports = {
  devtool: 'source-map',
  entry: [
    PATHS.app
  ],
  output: {
    path: PATHS.build,
    publicPath: '/',
    filename: 'bundle.js'
  },
  plugins: [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.UglifyJsPlugin({
      minimize: true,
      compress: {
        warnings: false
      }
    }),
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': JSON.stringify('production')
      }
    })
  ],
  module: {
    loaders: [
        // Set up jsx. This accepts js too thanks to RegExp
      {
        test: /\.jsx?$/,
        // Enable caching for improved performance during development
        // It uses default OS directory by default. If you need something
        // more custom, pass a path to it. I.e., babel?cacheDirectory=<path>
        loaders: ['babel?cacheDirectory'],
        // Parse only app files! Without this it will go through entire project.
        // In addition to being slow, that will most likely result in an error.
        include: PATHS.app
      },
      {
        // Test expects a RegExp! Note the slashes!
        test: /\.css$/,
        loader: "style-loader!css-loader!postcss-loader",
        // Include accepts either a path or an array of paths.
        include: PATHS.style
      },
      {
        test: /\.(png|jpg)$/,
        loader: 'file-loader?name=images/[name].[ext]',
        path: PATHS.images
      }
    ]
  },
  postcss: function (webpack) {
    return [
      postcssImport({ addDependencyTo: webpack }),
      require('autoprefixer'),
      require('precss'),
      require('cssnano')
    ];
  }
};<commit_msg>Fix: add build scripts for production<commit_after>const path = require('path')
const webpack = require('webpack')

module.exports = {
  devtool: 'source-map',

  entry: [
    './src/index'
  ],

  output: {
    path: path.join(__dirname, 'build'),
    filename: 'bundle.js',
    publicPath: '/build/'
  },

  plugins: [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.UglifyJsPlugin({
      minimize: true,
      compress: {
        warnings: false
      }
    }),
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': JSON.stringify('production')
      }
    })
  ],

  module: {
    loaders: [
      { test: /\.js?$/,
        loader: 'babel',
        exclude: /node_modules/ },
      { test: /\.scss?$/,
        loader: 'style!css!sass',
        include: path.join(__dirname, 'src', 'styles') },
      { test: /\.png$/,
        loader: 'file' },
      { test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
        loader: 'file'}
    ]
  }
}
{'fraction_non_alphanumeric': 0.15355696934644303, 'fraction_numerical': 0.003470213996529786, 'mean_word_length': 2.4555444555444557, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1644224', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1087, 'n_words': 274}