<commit_before>#!/usr/bin/env bash

printf "HEY! LISTEN!\nPUT THIS IN YOUR SHELL TO GET DEBUGS:\n"
printf 'export MOTION_DEBUG="true"'
printf "\n\n"

ROOT_DIRECTORY=$( cd $(dirname $0) ; pwd -P )/..
PACKAGES_PATH=${ROOT_DIRECTORY}/packages
# NOTE: Order is important
PACKAGES_TO_LINK=( "fs" "npm" "webpack-npm" "transform" "nice-styles" "client" "motion" )
NPM_ROOT=$( npm root -g )

for name in "${PACKAGES_TO_LINK[@]}"
do :
  cd ${PACKAGES_PATH}/${name}

  printf "Pruning in "${name}"\n"
  npm prune 1>/dev/null 2>/dev/null
  mkdir -p node_modules
  find node_modules -name "motion-*" -exec rm -r "{}" \;

  printf "Linking in other packages\n"
  manifest_contents=$(cat package.json)
  dependencies=$(printf "${manifest_contents#*dependencies}" | grep -E "motion-.*?\": " | perl -pe 's|"(\S+)":.*|\1|')
  if [ -n "${dependencies}" ]; then
    for dependency in ${dependencies}
    do :
      printf "Linking "${dependency}" in "${name}"\n"
      npm link ${dependency} --loglevel=error
    done
  fi

  printf "Installing dependencies\n"
  npm install --production

  printf "Linking self\n"
  npm link --loglevel=error

  if [ -f "prepublish.js" ]; then
    node prepublish.js
  fi

  printf "\n"
done<commit_msg>:bug: Install dev dependencies in bootstrap<commit_after>#!/usr/bin/env bash

printf "HEY! LISTEN!\nPUT THIS IN YOUR SHELL TO GET DEBUGS:\n"
printf 'export MOTION_DEBUG="true"'
printf "\n\n"

ROOT_DIRECTORY=$( cd $(dirname $0) ; pwd -P )/..
PACKAGES_PATH=${ROOT_DIRECTORY}/packages
# NOTE: Order is important
PACKAGES_TO_LINK=( "fs" "npm" "webpack-npm" "transform" "nice-styles" "client" "motion" )
NPM_ROOT=$( npm root -g )

for name in "${PACKAGES_TO_LINK[@]}"
do :
  cd ${PACKAGES_PATH}/${name}

  printf "Pruning in "${name}"\n"
  npm prune 1>/dev/null 2>/dev/null
  mkdir -p node_modules
  find node_modules -name "motion-*" -exec rm -r "{}" \;

  printf "Linking in other packages\n"
  manifest_contents=$(cat package.json)
  dependencies=$(printf "${manifest_contents#*dependencies}" | grep -E "motion-.*?\": " | perl -pe 's|"(\S+)":.*|\1|')
  if [ -n "${dependencies}" ]; then
    for dependency in ${dependencies}
    do :
      printf "Linking "${dependency}" in "${name}"\n"
      npm link ${dependency} --loglevel=error
    done
  fi

  printf "Installing dependencies\n"
  # to install devDependencies in packages
  npm install --development

  printf "Linking self\n"
  npm link --loglevel=error

  if [ -f "prepublish.js" ]; then
    node prepublish.js
  fi

  printf "\n"
done
{'fraction_non_alphanumeric': 0.17091633466135459, 'fraction_numerical': 0.0031872509960159364, 'mean_word_length': 3.719924812030075, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, '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': '5133101', 'n_tokens_mistral': 935, 'n_tokens_neox': 859, 'n_words': 253}