<commit_before>var path = require('path');
var webpack = require('webpack');

module.exports = {
  entry: path.join(__dirname, 'dev', 'plum.js'),
  output: {
    path: path.join(__dirname, 'build'),
    publicPath : '/build/',
    filename: 'plum.min.js',
  },
  module: {
    loaders: [
      {
        test: /\.font\.(js|json)$/,
        loader: 'style!css!fontgen?fileName=[fontname][ext]'
      },
      {
        test: /\.vue$/,
        loader: 'vue'
      },
      {
        test:   /\.js/,
        loader: 'babel',
        exclude : /(node_modules|assets)/
      },
      {
        test: /\.json$/,
        loader: 'json'
      },
      {
        test: /\.css/,
        loader: 'style!css'
      },
      {
        test: /\.html$/,
        loader: 'vue-html'
      },
      {
        test: /\.(png|jpe?g|gif|svg)$/i,
        loader: 'url',
        query: {
          limit: 10000,
          name: '[name].[ext]?[hash]'
        }
      }
    ],
  },
  devServer: {
    historyApiFallback: true,
    noInfo: true
  },
  devtool: 'eval-source-map'
};

if (process.env.NODE_ENV === 'production') {
  module.exports.devtool = 'source-map';
  module.exports.plugins = (module.exports.plugins || []).concat([
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"'
      }
    }),
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false
      }
    }),
    new webpack.optimize.OccurenceOrderPlugin()
  ]);
}
<commit_msg>Add library option to webpack output config<commit_after>var path = require('path');
var webpack = require('webpack');

module.exports = {
  entry: path.join(__dirname, 'dev', 'plum.js'),
  output: {
    path: path.join(__dirname, 'build'),
    publicPath : '/build/',
    filename: 'plum.min.js',
    library : 'Plum',
    libraryTarget : 'umd',
    umdNamedDefine : true
  },
  module: {
    loaders: [
      {
        test: /\.font\.(js|json)$/,
        loader: 'style!css!fontgen?fileName=[fontname][ext]'
      },
      {
        test: /\.vue$/,
        loader: 'vue'
      },
      {
        test:   /\.js/,
        loader: 'babel',
        exclude : /(node_modules|assets)/
      },
      {
        test: /\.json$/,
        loader: 'json'
      },
      {
        test: /\.css/,
        loader: 'style!css'
      },
      {
        test: /\.html$/,
        loader: 'vue-html'
      },
      {
        test: /\.(png|jpe?g|gif|svg)$/i,
        loader: 'url',
        query: {
          limit: 10000,
          name: '[name].[ext]?[hash]'
        }
      }
    ],
  },
  devServer: {
    historyApiFallback: true,
    noInfo: true
  },
  devtool: 'eval-source-map'
};

if (process.env.NODE_ENV === 'production') {
  module.exports.devtool = 'source-map';
  module.exports.plugins = (module.exports.plugins || []).concat([
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"'
      }
    }),
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false
      }
    }),
    new webpack.optimize.OccurenceOrderPlugin()
  ]);
}

{'fraction_non_alphanumeric': 0.18303425774877652, 'fraction_numerical': 0.0032626427406199023, 'mean_word_length': 1.7621621621621621, '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': '1309456', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1044, 'n_words': 178}