<commit_before>'use strict';

var extend = require('extend');
var globule = require('globule');
var path = require('path');
var rump = require('rump');
var webpack = require('webpack');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var DefinePlugin = webpack.DefinePlugin;
var DescPlugin = webpack.ResolverPlugin.DirectoryDescriptionFilePlugin;
var ResolverPlugin = webpack.ResolverPlugin;
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
var OccurrenceOrderPlugin = webpack.optimize.OccurrenceOrderPlugin;

module.exports = function() {
  var commonsChunk = 'common';
  var commonsFile;
  var sourceDir = path.join(rump.configs.main.paths.source.root,
                            rump.configs.main.paths.source.scripts);
  var destination = path.join(rump.configs.main.paths.destination.root,
                              rump.configs.main.paths.destination.scripts);
  var options = {
    entry: entries(),
    output: {
      path: destination,
      filename: '[name].js'
    },
    plugins: [
      new ResolverPlugin(new DescPlugin('bower.json', ['main'])),
      new DefinePlugin(rump.configs.main.scripts.macros)
    ],
    resolve: {
      alias: rump.configs.main.scripts.aliases,
      modulesDirectories: ['node_modules', 'bower_components'],
      root: path.resolve(sourceDir)
    },
    watchDelay: 200
  };

  if(rump.configs.main.environment === 'development') {
    options.debug = true;
    options.devtool = 'inline-source-map';
    options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';
  }
  else if(rump.configs.main.environment === 'production') {
    options.plugins = options.plugins || [];<commit_msg>Add loaders option for easy access by plugins<commit_after>'use strict';

var extend = require('extend');
var globule = require('globule');
var path = require('path');
var rump = require('rump');
var webpack = require('webpack');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var DefinePlugin = webpack.DefinePlugin;
var DescPlugin = webpack.ResolverPlugin.DirectoryDescriptionFilePlugin;
var ResolverPlugin = webpack.ResolverPlugin;
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
var OccurrenceOrderPlugin = webpack.optimize.OccurrenceOrderPlugin;

module.exports = function() {
  var commonsChunk = 'common';
  var commonsFile;
  var sourceDir = path.join(rump.configs.main.paths.source.root,
                            rump.configs.main.paths.source.scripts);
  var destination = path.join(rump.configs.main.paths.destination.root,
                              rump.configs.main.paths.destination.scripts);
  var options = {
    entry: entries(),
    module: {
      loaders: []
    },
    output: {
      path: destination,
      filename: '[name].js'
    },
    plugins: [
      new ResolverPlugin(new DescPlugin('bower.json', ['main'])),
      new DefinePlugin(rump.configs.main.scripts.macros)
    ],
    resolve: {
      alias: rump.configs.main.scripts.aliases,
      modulesDirectories: ['node_modules', 'bower_components'],
      root: path.resolve(sourceDir)
    },
    watchDelay: 200
  };

  if(rump.configs.main.environment === 'development') {
    options.debug = true;
    options.devtool = 'inline-source-map';
    options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';
  }
  else if(rump.configs.main.environment === 'production') {
    options.plugins = options.plugins || [];
{'fraction_non_alphanumeric': 0.12987393726180005, 'fraction_numerical': 0.001759014951627089, 'mean_word_length': 3.6548431105047747, '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': '6229206', 'n_tokens_mistral': 1029, 'n_tokens_neox': 1020, 'n_words': 187}