<commit_before>require "language/node"

class Webpack < Formula
  desc "Bundler for JavaScript and friends"
  homepage "https://webpack.js.org/"
  url "https://registry.npmjs.org/webpack/-/webpack-2.3.3.tgz"
  sha256 "d9e1268063f363eabd27c3a24d14ff83ed2108db0ad2fe476a1056634dee7b17"
  head "https://github.com/webpack/webpack.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "4ae226d55f9012a1a5efe89cacf2e8101571f5766950887e9763068d50bf1a1a" => :sierra
    sha256 "1521ff4c0d7d9b55c4df28cb4ad5afdc77f414459a62c741408c29d32d45db79" => :el_capitan
    sha256 "bcea126de1b6eb6e0160479bbffd7b46c2140772cd0a4ce12e0f11c5e6a4fa6c" => :yosemite
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"index.js").write <<-EOS.undent
      function component () {
        var element = document.createElement('div');
        element.innerHTML = 'Hello' + ' ' + 'webpack';
        return element;
      }

      document.body.appendChild(component());<commit_msg>webpack 2.4.1<commit_after>require "language/node"

class Webpack < Formula
  desc "Bundler for JavaScript and friends"
  homepage "https://webpack.js.org/"
  url "https://registry.npmjs.org/webpack/-/webpack-2.4.1.tgz"
  sha256 "6c7998db7719986842886b77cbabb137639bc06541d093b567a4882c934bd61b"
  head "https://github.com/webpack/webpack.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "4ae226d55f9012a1a5efe89cacf2e8101571f5766950887e9763068d50bf1a1a" => :sierra
    sha256 "1521ff4c0d7d9b55c4df28cb4ad5afdc77f414459a62c741408c29d32d45db79" => :el_capitan
    sha256 "bcea126de1b6eb6e0160479bbffd7b46c2140772cd0a4ce12e0f11c5e6a4fa6c" => :yosemite
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    (testpath/"index.js").write <<-EOS.undent
      function component () {
        var element = document.createElement('div');
        element.innerHTML = 'Hello' + ' ' + 'webpack';
        return element;
      }

      document.body.appendChild(component());
{'fraction_non_alphanumeric': 0.11392405063291139, 'fraction_numerical': 0.15822784810126583, 'mean_word_length': 4.319711538461538, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, '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': '5855863', 'n_tokens_mistral': 1054, 'n_tokens_neox': 877, 'n_words': 118}