<commit_before>.PHONY: test coverage

dev: clean image container networks logs

deps:
	@npm install

image:
	@docker build -t dev/frontend .

container:
	@docker run -it -d --name devfrontend -P -e NODE_ENV=development -e PORT=8080 -p 8080:8080 dev/frontend

networks:
	@docker network connect dockeronly_default devfrontend

clean:
	@if [ $$(docker ps -a -q -f name=devfrontend | wc -l) -ge 1 ]; then docker rm -f devfrontend; fi
	@if [ $$(docker images -q dev/frontend | wc -l) -ge 1 ]; then docker rmi dev/frontend; fi

test:
	@$$(npm bin)/istanbul cover $$(npm bin)/_mocha -- --recursive

test-w:
	@$$(npm bin)/mocha -w --recursive

coverage:
	@open coverage/lcov-report/index.html

browser:
	@open http://$$(docker-machine ip):8080

logs:
	@docker logs -f devfrontend

e2e:
	@./test/e2e/runner.sh<commit_msg>Fix `test` task in Makefile<commit_after>.PHONY: test coverage

dev: clean image container networks logs

deps:
	@npm install

image:
	@docker build -t dev/frontend .

container:
	@docker run -it -d --name devfrontend -P -e NODE_ENV=development -e PORT=8080 -p 8080:8080 dev/frontend

networks:
	@docker network connect dockeronly_default devfrontend

clean:
	@if [ $$(docker ps -a -q -f name=devfrontend | wc -l) -ge 1 ]; then docker rm -f devfrontend; fi
	@if [ $$(docker images -q dev/frontend | wc -l) -ge 1 ]; then docker rmi dev/frontend; fi

test:
	@$$(npm bin)/istanbul cover $$(npm bin)/_mocha -- test/*_test.js test/api/*_test.js

test-w:
	@$$(npm bin)/mocha -w test/*_test.js test/api/*_test.js

coverage:
	@open coverage/lcov-report/index.html

browser:
	@open http://$$(docker-machine ip):8080

logs:
	@docker logs -f devfrontend

e2e:
	@./test/e2e/runner.sh
{'fraction_non_alphanumeric': 0.14489311163895488, 'fraction_numerical': 0.023752969121140142, 'mean_word_length': 3.6418732782369148, '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': '2945587', 'n_tokens_mistral': 708, 'n_tokens_neox': 637, 'n_words': 197}