<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"

# Unlink previously installed packages
NPM_PREFIX=$(npm get prefix)
rm -rf "$NPM_PREFIX"/bin/motion*
rm -rf "$NPM_PREFIX"/lib/node_modules/motion*
. ${ROOT_DIRECTORY}/scripts/__variables.sh

ROOT_DIRECTORY=$( cd $(dirname $0)/.. ; pwd -P )
PACKAGES_PATH=${ROOT_DIRECTORY}/packages
PACKAGES_TO_LINK=${PACKAGE_NAMES}
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|')
  for dependency in ${dependencies}
  do :
    printf "Linking "${dependency}" in "${name}"\n"
    npm link ${dependency} --loglevel=error
  done

  printf "Installing dependencies\n"
  # to install devDependencies in packages
  npm install --development
<commit_msg>:bug: fix bug with bootstrap vars<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"

# Unlink previously installed packages
NPM_PREFIX=$(npm get prefix)
rm -rf "$NPM_PREFIX"/bin/motion*
rm -rf "$NPM_PREFIX"/lib/node_modules/motion*

ROOT_DIRECTORY=$( cd $(dirname $0)/.. ; pwd -P )

. ${ROOT_DIRECTORY}/scripts/__variables.sh

PACKAGES_PATH=${ROOT_DIRECTORY}/packages
PACKAGES_TO_LINK=${PACKAGE_NAMES}
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|')
  for dependency in ${dependencies}
  do :
    printf "Linking "${dependency}" in "${name}"\n"
    npm link ${dependency} --loglevel=error
  done

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

{'fraction_non_alphanumeric': 0.16118143459915613, 'fraction_numerical': 0.0033755274261603376, 'mean_word_length': 4.388636363636364, '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': '7208259', 'n_tokens_mistral': 876, 'n_tokens_neox': 802, 'n_words': 223}