<commit_before>#! /usr/bin/env bash

#set -eu

echo 'Running webpack...'
npx webpack

if [[ ! -d ./dist ]]; then
	mkdir -p dist/unpacked/scripts
	mkdir -p dist/packed
fi

echo 'Copying HTML files...'
cp -r src/*.html dist/unpacked/

echo 'Copying image files...'
cp -r src/images dist/unpacked/

echo 'Copying style files...'
cp -r src/styles dist/unpacked/

echo 'Copying manifest...'
cp -r manifest.json dist/unpacked/

echo 'Copying bundled js files...'
cp -r dist/scripts/* dist/unpacked/scripts/

echo 'Packaging extension...'
pushd dist/unpacked
zip -r -FS ../packed/tabbo.zip *
popd

echo 'Linting...'
npx addons-linter dist/packed/tabbo.zip<commit_msg>ignore ds_store when packaging<commit_after>#! /usr/bin/env bash

#set -eu

echo 'Running webpack...'
npx webpack

if [[ ! -d ./dist ]]; then
	mkdir -p dist/unpacked/scripts
	mkdir -p dist/packed
fi

echo 'Copying HTML files...'
cp -r src/*.html dist/unpacked/

echo 'Copying image files...'
cp -r src/images dist/unpacked/

echo 'Copying style files...'
cp -r src/styles dist/unpacked/

echo 'Copying manifest...'
cp -r manifest.json dist/unpacked/

echo 'Copying bundled js files...'
cp -r dist/scripts/* dist/unpacked/scripts/

echo 'Packaging extension...'
pushd dist/unpacked
zip -r --exclude=*.DS_Store* -FS ../packed/tabbo.zip *
popd

echo 'Linting...'
npx addons-linter dist/packed/tabbo.zip
{'fraction_non_alphanumeric': 0.1545253863134658, 'fraction_numerical': 0.0, 'mean_word_length': 3.0963855421686746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5727247', 'n_tokens_mistral': 493, 'n_tokens_neox': 481, 'n_words': 155}