<commit_before>SHELL := /bin/bash
PATH  := node_modules/.bin:${PATH}

tests   = ./test/*-test.js
version = $(shell node -p "require('./package.json').version")

default: test cov

.PHONY: test
test:
	@jslint --color lib/*.js ${tests}
	@mocha --reporter list

cov:
	@browserify -t coverify ${tests} | mocaccino -b | phantomic | coverify

html:
	@browserify ${tests} | mocaccino -b | consolify -r -t "live-list unit tests" > test/all.html

release: test cov
ifeq (v${version},$(shell git tag -l v${version}))
	@echo "Version ${version} already released!"
	@exit 1
endif
	@echo "Creating tag v${version}"
	@git tag -a -m "Release ${version}" v${version}
	@git push --tags
	@echo "Publishing to npm"
	@npm publish<commit_msg>Taking project name in standalone test page title from package.json<commit_after>SHELL := /bin/bash
PATH  := node_modules/.bin:${PATH}

tests   = ./test/*-test.js
version = $(shell node -p "require('./package.json').version")
name    = $(shell node -p "require('./package.json').name")

default: test cov

.PHONY: test
test:
	@jslint --color lib/*.js ${tests}
	@mocha --reporter list

cov:
	@browserify -t coverify ${tests} | mocaccino -b | phantomic | coverify

html:
	@browserify ${tests} | mocaccino -b | consolify -r -t "${name} unit tests" > test/all.html

release: test cov
ifeq (v${version},$(shell git tag -l v${version}))
	@echo "Version ${version} already released!"
	@exit 1
endif
	@echo "Creating tag v${version}"
	@git tag -a -m "Release ${version}" v${version}
	@git push --tags
	@echo "Publishing to npm"
	@npm publish
{'fraction_non_alphanumeric': 0.17245817245817247, 'fraction_numerical': 0.001287001287001287, 'mean_word_length': 3.9522292993630574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5459451', 'n_tokens_mistral': 571, 'n_tokens_neox': 554, 'n_words': 177}