<commit_before>var path = require('path')
var webpack = require('webpack')
var StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin')

var isDev = process.env.NODE_ENV !== 'production'
var root  = __dirname

module.exports = {

  context: root,

  devtool: isDev ? 'inline-source-map' : 'source-map',

  entry: {
    'chatbot'      : './chatbot/client',
    'react-router' : './react-router/client',
    'simple-svg'   : './simple-svg/client',
    'painter'      : './painter/client',

    'chatbot-static'      : './chatbot/static',
    'react-router-static' : './react-router/static',
    'simple-svg-static'   : './simple-svg/static',
    'painter-static'      : './painter/static'
  },

  output: {
    filename: '[name]/main.js',
    path: path.resolve(root, '..', 'site'),
    libraryTarget: 'umd'
  },

  plugins: [
    new StaticSiteGeneratorPlugin('chatbot-static', ['chatbot' ], {}),
    new StaticSiteGeneratorPlugin('react-router-static', ['react-router' ], {}),
    new StaticSiteGeneratorPlugin('simple-svg-static', ['simple-svg' ], {}),
    new StaticSiteGeneratorPlugin('painter-static', ['painter' ], {}),

    new webpack.DefinePlugin({
      "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV)
    })
  ],

  resolve: {
    extensions: [ '', '.js', '.jsx' ]
  },

  module: {
    loaders: [
      {
        test: /\.html/,
        loader: 'mustache',
        exclude: /node_modules/
      },
      {
      test     : /\.jsx*$/,
      loader   : 'babel',
      query    : {
        optional : [ 'runtime' ]
      },
      exclude: /node_modules/
    }]
  },

  devServer: {
    contentBase : path.resolve(root, '..', 'site'),
    publicPath  : '/'
  }
}

// Inject the dev server hot module replacement into
// each entry point on development
if (!isDev) {
  // Otherwise enable production settings
  module.exports.plugins.push(
    new webpack.optimize.UglifyJsPlugin(),
    new webpack.optimize.OccurenceOrderPlugin()
  )
}<commit_msg>Run at a specific port<commit_after>var path = require('path')
var webpack = require('webpack')
var StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin')

var isDev = process.env.NODE_ENV !== 'production'
var root  = __dirname

module.exports = {

  context: root,

  devtool: isDev ? 'inline-source-map' : 'source-map',

  entry: {
    'chatbot'      : './chatbot/client',
    'react-router' : './react-router/client',
    'simple-svg'   : './simple-svg/client',
    'painter'      : './painter/client',

    'chatbot-static'      : './chatbot/static',
    'react-router-static' : './react-router/static',
    'simple-svg-static'   : './simple-svg/static',
    'painter-static'      : './painter/static'
  },

  output: {
    filename: '[name]/main.js',
    path: path.resolve(root, '..', 'site'),
    libraryTarget: 'umd'
  },

  plugins: [
    new StaticSiteGeneratorPlugin('chatbot-static', ['chatbot' ], {}),
    new StaticSiteGeneratorPlugin('react-router-static', ['react-router' ], {}),
    new StaticSiteGeneratorPlugin('simple-svg-static', ['simple-svg' ], {}),
    new StaticSiteGeneratorPlugin('painter-static', ['painter' ], {}),

    new webpack.DefinePlugin({
      "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV)
    })
  ],

  resolve: {
    extensions: [ '', '.js', '.jsx' ]
  },

  module: {
    loaders: [
      {
        test: /\.html/,
        loader: 'mustache',
        exclude: /node_modules/
      },
      {
      test     : /\.jsx*$/,
      loader   : 'babel',
      query    : {
        optional : [ 'runtime' ]
      },
      exclude: /node_modules/
    }]
  },

  devServer: {
    contentBase : path.resolve(root, '..', 'site'),
    publicPath  : '/',
    port        : process.env.PORT || 4000
  }
}

// Inject the dev server hot module replacement into
// each entry point on development
if (!isDev) {
  // Otherwise enable production settings
  module.exports.plugins.push(
    new webpack.optimize.UglifyJsPlugin(),
    new webpack.optimize.OccurenceOrderPlugin()
  )
}
{'fraction_non_alphanumeric': 0.1768944099378882, 'fraction_numerical': 0.0009937888198757764, 'mean_word_length': 2.6434389140271493, 'pattern_counts': {'":': 2, '<': 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': '5276319', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1295, 'n_words': 237}