<commit_before>#!/bin/sh
##

echo ''
echo '****Bundling VEP for Browser****'
echo ''

INPUT="./bundle.js"
TMP="./tempbundle.js"
OUTPUT="./vepbundle.js"

# package
cd libs
./package.sh

cd ../

# remove the existing file if it exists
if [ -f "$OUTPUT" ]; then
    rm "$OUTPUT"
fi

browserify "$INPUT" -o "$TMP"
cat bundle-prelim.js > "$OUTPUT"
cat "$TMP" >> "$OUTPUT"
rm "$TMP"
<commit_msg>add some checks in bundle.sh to emit a nice error message if browserify isn't available<commit_after>#!/bin/sh
##

echo ''
echo '****Bundling VEP for Browser****'
echo ''

export PATH=$PATH:node_modules/.bin
BROWSERIFY=`which browserify 2> /dev/null`

if [ ! -x "$BROWSERIFY" ] ; then
    echo "can't find browserify.  try: npm install"
    exit 1
fi

INPUT="./bundle.js"
TMP="./tempbundle.js"
OUTPUT="./vepbundle.js"

# package
cd libs
./package.sh

cd ../

# remove the existing file if it exists
if [ -f "$OUTPUT" ]; then
    rm "$OUTPUT"
fi

browserify "$INPUT" -o "$TMP"
cat bundle-prelim.js > "$OUTPUT"
cat "$TMP" >> "$OUTPUT"
rm "$TMP"
{'fraction_non_alphanumeric': 0.18622696411251213, 'fraction_numerical': 0.0019398642095053346, 'mean_word_length': 3.6486486486486487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '2576776', 'n_tokens_mistral': 393, 'n_tokens_neox': 387, 'n_words': 118}