<commit_before>#!/bin/bash

#rm -r build
#rm -r cache

elm -m -o --src-dir=./src/elm --set-runtime=elm-runtime.js src/elm/Main.elm

cp -r ./src/icons ./build
cp -r ./src/imgs ./build

mkdir -p ./build/js

#uglifyjs $HOME/.cabal/share/Elm-0.12.3/elm-runtime.js > ./build/js/elm-runtime.js
#evil hack to work around https://github.com/elm-lang/Elm/issues/671
cat $HOME/.cabal/share/Elm-0.12.3/elm-runtime.js | perl -pe "s/if \(currP.href === ''\) {/if (currP.href === '' || !node.lastNode) {/g" > ./build/js/elm-runtime.js

for pathname in ./build/src/elm/*.js
do
    filename="${pathname##*/}"
    uglifyjs "$pathname" > "./build/js/$filename"
    #cp "$pathname" "./build/js/$filename"
done

cp ./src/index.html ./build/index.html
uglifyjs ./src/htmlMain.js > ./build/js/htmlMain.js
yui-compressor ./src/style.css > ./build/style.css

rm -r ./build/src<commit_msg>clean up<commit_after>#!/bin/bash

#rm -r build
#rm -r cache

elm -m -o --src-dir=./src/elm --set-runtime=elm-runtime.js src/elm/Main.elm

cp -r ./src/imgs ./build

mkdir -p ./build/js

#uglifyjs $HOME/.cabal/share/Elm-0.12.3/elm-runtime.js > ./build/js/elm-runtime.js
#evil hack to work around https://github.com/elm-lang/Elm/issues/671
cat $HOME/.cabal/share/Elm-0.12.3/elm-runtime.js | perl -pe "s/if \(currP.href === ''\) {/if (currP.href === '' || !node.lastNode) {/g" > ./build/js/elm-runtime.js

for pathname in ./build/src/elm/*.js
do
    filename="${pathname##*/}"
    uglifyjs "$pathname" > "./build/js/$filename"
    #cp "$pathname" "./build/js/$filename"
done

cp ./src/index.html ./build/index.html
uglifyjs ./src/htmlMain.js > ./build/js/htmlMain.js
yui-compressor ./src/style.css > ./build/style.css

rm -r ./build/src
{'fraction_non_alphanumeric': 0.22510312315851502, 'fraction_numerical': 0.01296405421331762, 'mean_word_length': 2.7733333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3156764', 'n_tokens_mistral': 718, 'n_tokens_neox': 701, 'n_words': 134}