<commit_before>#!/bin/bash

declare -x VERSION=1.1.0
declare -x HEADER="// mayflower.js v$VERSION"

rm -rf build
mkdir -p build/work

echo $HEADER > build/mayflower.js
echo $HEADER > build/mayflower.min.js

echo "[build] building mayflower v$VERSION..."
echo "[build] generating mayflower.js..."
cat src/main/javascript/lang.js src/main/javascript/widget.js >> build/mayflower.js
cp build/mayflower.js build/mayflower-$VERSION.js

echo "[build] generating mayflower.min.js..."
curl -X POST -s --data-urlencode "input@build/mayflower.js" https://javascript-minifier.com/raw >> build/mayflower.min.js
cp build/mayflower.min.js build/mayflower-$VERSION.min.js<commit_msg>issue #6 - updating build process to load version from project.properties<commit_after>#!/bin/bash

VERSION=`grep "version" project.properties  | cut -d '=' -f2`
declare -x HEADER="// mayflower.js v$VERSION"

rm -rf build
mkdir -p build/work

echo $HEADER > build/mayflower.js
echo $HEADER > build/mayflower.min.js

echo "[build] building mayflower v$VERSION..."
echo "[build] generating mayflower.js..."
cat src/main/javascript/lang.js src/main/javascript/widget.js >> build/mayflower.js
cp build/mayflower.js build/mayflower-$VERSION.js

echo "[build] generating mayflower.min.js..."
curl -X POST -s --data-urlencode "input@build/mayflower.js" https://javascript-minifier.com/raw >> build/mayflower.min.js
cp build/mayflower.min.js build/mayflower-$VERSION.min.js
{'fraction_non_alphanumeric': 0.15143056524773202, 'fraction_numerical': 0.0034891835310537334, 'mean_word_length': 4.291512915129151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '5019866', 'n_tokens_mistral': 508, 'n_tokens_neox': 468, 'n_words': 115}