<commit_before>REPORTER = dot

TARGETS ?= unexpected.js unexpected.es5.js

lint:
	@./node_modules/.bin/jshint lib/*.js test/*.js

.PHONY: lint

unexpected.js: lint lib/*
	./node_modules/.bin/browserify -e lib -s weknowhow.expect lib/index.js > $@

unexpected.es5.js: lint lib/*
	./node_modules/.bin/browserify -e lib -s weknowhow.expect -u lib/shim-es4.js lib/index.js > $@

test-phantomjs: lint unexpected.js
	@$(eval QUERY=$(shell node -e "console.log(decodeURIComponent(process.argv.pop()))" "${grep}")) \
    ./node_modules/.bin/mocha-phantomjs test/tests.html?grep=${QUERY}

test: lint
	mocha -R spec

.PHONY: test

test-production: lint ${TARGETS}<commit_msg>Simplified browserify command lines by not mentioning the "main" module, which is then retrieved from package.json.<commit_after>REPORTER = dot

TARGETS ?= unexpected.js unexpected.es5.js

lint:
	@./node_modules/.bin/jshint lib/*.js test/*.js

.PHONY: lint

unexpected.js: lint lib/*
	./node_modules/.bin/browserify -e lib -s weknowhow.expect > $@

unexpected.es5.js: lint lib/*
	./node_modules/.bin/browserify -e lib -s weknowhow.expect -u lib/shim-es4.js > $@

test-phantomjs: lint unexpected.js
	@$(eval QUERY=$(shell node -e "console.log(decodeURIComponent(process.argv.pop()))" "${grep}")) \
    ./node_modules/.bin/mocha-phantomjs test/tests.html?grep=${QUERY}

test: lint
	mocha -R spec

.PHONY: test

test-production: lint ${TARGETS}
{'fraction_non_alphanumeric': 0.162873399715505, 'fraction_numerical': 0.004267425320056899, 'mean_word_length': 3.954225352112676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1801720', 'n_tokens_mistral': 548, 'n_tokens_neox': 534, 'n_words': 116}