<commit_before>class Iojs < Formula
  homepage "https://iojs.org/"
  url "https://iojs.org/dist/v2.0.2/iojs-v2.0.2.tar.xz"
  sha256 "afab3752cf9143a13784cd9d9c38b0ff5fd4aa77dffded2f5c3742c42b9743a2"

  conflicts_with "node", :because => "io.js includes a symlink named node for compatibility."

  option "with-debug", "Build with debugger hooks"
  option "without-npm", "npm will not be installed"
  option "without-completion", "npm bash completion will not be installed"

  depends_on :python => :build

  resource "npm" do
    url "https://registry.npmjs.org/npm/-/npm-2.9.0.tgz"
    sha256 "a4d1434e934eaf08d985dbe3b70e0d456fb6866828afc91e99b3aac286fca055"
  end

  def install
    args = %W[--prefix=#{prefix} --without-npm]
    args << "--debug" if build.with? "debug"

    system "./configure", *args
    system "make", "install"

    if build.with? "npm"
      resource("npm").stage buildpath/"npm_install"

      # make sure npm can find iojs<commit_msg>Upgrade to iojs-2.1.0 and npm-2.10.1<commit_after>class Iojs < Formula
  homepage "https://iojs.org/"
  url "https://iojs.org/dist/v2.1.0/iojs-v2.1.0.tar.xz"
  sha256 "b9bb7fb626a0f0f0babb3b042f61eba55ff0dec4645682fbb36b5bab13d5dd29"

  conflicts_with "node", :because => "io.js includes a symlink named node for compatibility."

  option "with-debug", "Build with debugger hooks"
  option "without-npm", "npm will not be installed"
  option "without-completion", "npm bash completion will not be installed"

  depends_on :python => :build

  resource "npm" do
    url "https://registry.npmjs.org/npm/-/npm-2.10.1.tgz"
    sha256 "5b57c177bcaba628b04aba22f1112f409a0344c74653eb8c9185df24a97ac01b"
  end

  def install
    args = %W[--prefix=#{prefix} --without-npm]
    args << "--debug" if build.with? "debug"

    system "./configure", *args
    system "make", "install"

    if build.with? "npm"
      resource("npm").stage buildpath/"npm_install"

      # make sure npm can find iojs
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.09384615384615384, 'mean_word_length': 3.7012048192771085, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '3341456', 'n_tokens_mistral': 853, 'n_tokens_neox': 725, 'n_words': 163}