<commit_before>clean:
	find src \( -name "*.html" -o -name "*.css" -o -name "*.js" \) -delete

test:
	http-server src $(Q) & \
	trap "kill $$!; exit" INT; \
	open -g "http://localhost:8080" & \
	while true; do find . \
		-not -path "*.git*" \
		-a -not -path "*node_modules*" \
		| entr -d $(MAKE) || [ $$? == 2 ]; \
	done

git-ok:
	[ -z "$$(git status --porcelain)" ]
	[ "$$(git rev-parse --abbrev-ref @)" = master ]

surge:
	grep -q "surge.sh" ~/.netrc || surge login

upload:
	git push -q origin master
	mv src/404/index.html src/404.html
	surge -d azdavis.xyz -p src $(Q)
	mv src/404.html src/404/index.html

setup: .git/hooks/pre-commit node_modules $(BINARY) surge<commit_msg>phony: just find src<commit_after>clean:
	find src \( -name "*.html" -o -name "*.css" -o -name "*.js" \) -delete

test:
	http-server src $(Q) & \
	trap "kill $$!; exit" INT; \
	open -g "http://localhost:8080" & \
	while true; do find src | entr -d $(MAKE) || [ $$? == 2 ]; done

git-ok:
	[ -z "$$(git status --porcelain)" ]
	[ "$$(git rev-parse --abbrev-ref @)" = master ]

surge:
	grep -q "surge.sh" ~/.netrc || surge login

upload:
	git push -q origin master
	mv src/404/index.html src/404.html
	surge -d azdavis.xyz -p src $(Q)
	mv src/404.html src/404/index.html

setup: .git/hooks/pre-commit node_modules $(BINARY) surge
{'fraction_non_alphanumeric': 0.2127008416220352, 'fraction_numerical': 0.026013771996939557, 'mean_word_length': 2.7478510028653296, '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': '285630', 'n_tokens_mistral': 569, 'n_tokens_neox': 541, 'n_words': 152}