<commit_before># -*- mode: bash; tab-width: 2; -*-
# vim: ts=2 sw=2 ft=bash noet

# Brunch is an ultra-fast HTML5 build tool (http://brunch.io/)

# Install brunch npm module
nodejs_brunch_prepare() {
  # return early if brunch is not required
  [[ "$(nodejs_is_brunch_required)" = "false" ]] \
    && echo "false" && return

  # install brunch
  ( cd $(nos_code_dir)
    nos_run_subprocess "installing brunch" "npm install brunch" )
}

# nothing to configure
nodejs_brunch_configure() {
 echo "false"
}

#
nodejs_brunch_compile() {
  # return early if brunch is not required
  [[ "$(nodejs_is_brunch_required)" = "false" ]] \
    && echo "false" && return

  # todo: make the brunch command available through Boxfile
  ( cd $(nos_code_dir)
    nos_run_subprocess "running brunch" \
      "node_modules/.bin/brunch build --production" )
}

# brunch doesn't store anything between builds
nodejs_brunch_detect_lib_dirs() {
  return
}

# external, visible declaration of requirements
nodejs_detect_brunch_requirements() {
  if [[ -f $(nos_code_dir)/config.coffee ]]; then
    nos_print_bullet_sub "found config.coffee"
    echo "true"
  elif [[ -f $(nos_code_dir)/config.js ]]
    nos_print_bullet_sub "found config.js"
    echo "true"
  else
    echo "false"
  fi
}

# internal declaration on whether brunch is required
nodejs_is_brunch_required() {
  if [[ -f $(nos_code_dir)/config.coffee || -f $(nos_code_dir)/config.js ]]; then
  	echo "true"
  else
  	echo "false"
  fi
}<commit_msg>Fix bash elif syntax error<commit_after># -*- mode: bash; tab-width: 2; -*-
# vim: ts=2 sw=2 ft=bash noet

# Brunch is an ultra-fast HTML5 build tool (http://brunch.io/)

# Install brunch npm module
nodejs_brunch_prepare() {
  # return early if brunch is not required
  [[ "$(nodejs_is_brunch_required)" = "false" ]] \
    && echo "false" && return

  # install brunch
  ( cd $(nos_code_dir)
    nos_run_subprocess "installing brunch" "npm install brunch" )
}

# nothing to configure
nodejs_brunch_configure() {
 echo "false"
}

#
nodejs_brunch_compile() {
  # return early if brunch is not required
  [[ "$(nodejs_is_brunch_required)" = "false" ]] \
    && echo "false" && return

  # todo: make the brunch command available through Boxfile
  ( cd $(nos_code_dir)
    nos_run_subprocess "running brunch" \
      "node_modules/.bin/brunch build --production" )
}

# brunch doesn't store anything between builds
nodejs_brunch_detect_lib_dirs() {
  return
}

# external, visible declaration of requirements
nodejs_detect_brunch_requirements() {
  if [[ -f $(nos_code_dir)/config.coffee ]]; then
    nos_print_bullet_sub "found config.coffee"
    echo "true"
  elif [[ -f $(nos_code_dir)/config.js ]]; then
    nos_print_bullet_sub "found config.js"
    echo "true"
  else
    echo "false"
  fi
}

# internal declaration on whether brunch is required
nodejs_is_brunch_required() {
  if [[ -f $(nos_code_dir)/config.coffee || -f $(nos_code_dir)/config.js ]]; then
  	echo "true"
  else
  	echo "false"
  fi
}
{'fraction_non_alphanumeric': 0.124790899966544, 'fraction_numerical': 0.0026764804282368685, 'mean_word_length': 3.838187702265372, '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': '4863428', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1040, 'n_words': 275}