<commit_before>var webpack = require("webpack");
var createVariants = require('parallel-webpack').createVariants;

function createConfig(options) {
  var plugins = [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin()
  ];
  if (options.minified) {
    plugins.push(new webpack.optimize.UglifyJsPlugin({
      sourceMap: false,
      compress: {
        warnings: false
      }
    }));
  }

  return {
    entry: __dirname + "/src/index.js",
    output: {
      path:  __dirname + "/dist/js",
      filename: 'webaudio-peaks.' +
        options.target +
        (options.minified ? '.min' : '')
        + '.js',
      library: 'webaudioPeaks',
      libraryTarget: options.target
    },
    plugins: plugins
  };
}

module.exports = createVariants({
  minified: [true, false],
  target: ['var', 'commonjs2', 'umd', 'amd']
}, createConfig);<commit_msg>Output folder only needs to be /dist.<commit_after>var webpack = require("webpack");
var createVariants = require('parallel-webpack').createVariants;

function createConfig(options) {
  var plugins = [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin()
  ];
  if (options.minified) {
    plugins.push(new webpack.optimize.UglifyJsPlugin({
      sourceMap: false,
      compress: {
        warnings: false
      }
    }));
  }

  return {
    entry: __dirname + "/src/index.js",
    output: {
      path:  __dirname + "/dist",
      filename: 'webaudio-peaks.' +
        options.target +
        (options.minified ? '.min' : '')
        + '.js',
      library: 'webaudioPeaks',
      libraryTarget: options.target
    },
    plugins: plugins
  };
}

module.exports = createVariants({
  minified: [true, false],
  target: ['var', 'commonjs2', 'umd', 'amd']
}, createConfig);
{'fraction_non_alphanumeric': 0.14952751528627015, 'fraction_numerical': 0.0011117287381878821, 'mean_word_length': 2.8793103448275863, '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': '1257593', 'n_tokens_mistral': 576, 'n_tokens_neox': 573, 'n_words': 113}