<commit_before>
.PHONY: app app-deps app-prod app-clean app-clean-prod server server-deps server-prod dist-clean dist

app-deps:
	cd app && npm install && typings install

app: app-deps
	cd app && webpack

app-prod: app-deps
	cd app && webpack --config ./webpack.config.prod.js

app-clean:
	rm -rf ./app/build

app-clean-prod:
	rm -rf ./app/build/min

server-deps:
	cd server && go get

server: server-deps
	cd server && GOARCH=amd64 && GOOS=linux go build

server-prod: server-deps
	cd server && GOARCH=amd64 && GOOS=linux go build -o ./server-linux

dist-clean:
	rm -rf ./dist

dist: app-clean-prod dist-clean app-prod server-prod
	mkdir -p ./dist
	mkdir -p ./dist/service
	mkdir -p ./dist/var
	cp -r app/build/min/assets ./dist/service/
	mv server/server-linux ./dist/service/server
	cp -r server/server-prod.yml ./dist/var/
	cp -r server/test ./dist/var/data
	tar -czf website.tgz ./dist<commit_msg>Don't package test data in distribution packages<commit_after>
.PHONY: app app-deps app-prod app-clean app-clean-prod server server-deps server-prod dist-clean dist

app-deps:
	cd app && npm install && typings install

app: app-deps
	cd app && webpack

app-prod: app-deps
	cd app && webpack --config ./webpack.config.prod.js

app-clean:
	rm -rf ./app/build

app-clean-prod:
	rm -rf ./app/build/min

server-deps:
	cd server && go get

server: server-deps
	cd server && GOARCH=amd64 && GOOS=linux go build

server-prod: server-deps
	cd server && GOARCH=amd64 && GOOS=linux go build -o ./server-linux

dist-clean:
	rm -rf ./dist

dist: app-clean-prod dist-clean app-prod server-prod
	mkdir -p ./dist
	mkdir -p ./dist/service
	mkdir -p ./dist/var
	cp -r app/build/min/assets ./dist/service/
	mv server/server-linux ./dist/service/server
	cp -r server/server-prod.yml ./dist/var/server-example.yml
	tar -czf website.tgz ./dist
{'fraction_non_alphanumeric': 0.1387061403508772, 'fraction_numerical': 0.0043859649122807015, 'mean_word_length': 3.0555555555555554, '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': '7328965', 'n_tokens_mistral': 691, 'n_tokens_neox': 672, 'n_words': 199}