<commit_before>org="openfin"
module="finbars"

# set variable repo to current directory name (without path)
repo=${PWD##*/}

# make sure the docs are built
gulp doc >/dev/null

# remove temp directory in case it already exists, remake it, switch to it
rm -rf ../temp >/dev/null
mkdir ../temp
pushd ../temp >/dev/null

# clone it so it will be a branch of the repo
git clone -q --single-branch http://github.com/$org/$repo.git
cd $repo >/dev/null

# create and switch to a new gh-pages branch
git checkout -q --orphan gh-pages

# remove all content from this new branch
git rm -rf -q .

# copy the doc directory from the workspace
cp -R ../../$repo/doc/* . >/dev/null

# copy index.js from repo/. to the cdn directory as $module.js
cp ../../$repo/index.js ./$module.js >/dev/null

# make a minified version
uglify -s $module.js -o $module.min.js

# copy the demo
cp ../../$repo/demo.html . >>/dev/null

# send it up
git add . >/dev/null
git commit -q -m '(See gh-pages.sh on master branch.)'
git push -ufq origin gh-pages >/dev/null

# copy the demo
cp ../../$repo/demo.html . >>/dev/null

# back to workspace
popd >/dev/null

# remove temp directory
rm -rf ../temp >/dev/null

echo 'Opening page at http://$org.github.io/$repo/ ...'
open http://$org.github.io/$repo/
echo 'CAVEAT: New pages will not be immediately available so wait a few minutes and refresh.'
<commit_msg>gh-pages.sh first draft<commit_after>org="openfin"
module="fin-hypergrid"

# set variable repo to current directory name (without path)
repo=${PWD##*/}

# remove temp directory in case it already exists, remake it, switch to it
rm -rf ../temp >/dev/null
mkdir ../temp
pushd ../temp >/dev/null

# clone it so it will be a branch of the repo
git clone -q --single-branch http://github.com/$org/$repo.git
cd $repo >/dev/null

# make sure the docs are built
gulp build >/dev/null
gulp doc >/dev/null

# stash relevant folders
mv demo doc ..

# create and switch to a new gh-pages branch
git checkout -q --orphan gh-pages

# remove all content from this new branch
git rm -rf -q .

# copy the doc directory from the stash
cp -R ../../doc . >/dev/null

# copy the contents of the demo directory (which includes index.html) from the stash
cp -R ../../demo/* . >/dev/null

# send it up
git add . >/dev/null
git commit -q -m '(See gh-pages.sh on master branch.)'
git push -ufq origin gh-pages >/dev/null

# back to workspace
popd >/dev/null

# remove temp directory
# rm -rf ../temp >/dev/null

echo 'Opening page at http://$org.github.io/$repo/ ...'
open http://$org.github.io/$repo/
echo 'CAVEAT: New pages will not be immediately available so wait a few minutes and refresh.'

{'fraction_non_alphanumeric': 0.14112750662126372, 'fraction_numerical': 0.0, 'mean_word_length': 2.9580838323353293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, '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': '3651123', 'n_tokens_mistral': 902, 'n_tokens_neox': 870, 'n_words': 369}