<commit_before>SRC = src/twig.header.js src/twig.core.js src/twig.fills.js src/twig.lib.js src/twig.logic.js src/twig.expression.js src/twig.expression.operator.js src/twig.filters.js src/twig.functions.js src/twig.tests.js src/twig.exports.js src/twig.compiler.js src/twig.module.js

TESTS = test/*.js
TESTSEXT = test-ext/*.js
REPORTER = spec

all: twig.js twig.min.js

test:
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter $(REPORTER) \
		--timeout 100 \
		--growl \
		$(TESTS)

twig.php:
	./test-ext/checkout.sh

testext: twig.php
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter $(REPORTER) \
		--timeout 100 \
		--growl \
		$(TESTSEXT)

twig.js: $(SRC)
	cat $^ > $@
	cp $@ demos/node_express/public/vendor/
	cp $@ demos/twitter_backbone/vendor/

twig.min.js: twig.js
	./node_modules/.bin/uglifyjs $< > $@

docs: test-docs annotated-docs

test-docs:
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter markdown \
		--timeout 100 \
		--growl \
		$(TESTS) > docs/tests.md

annotated-docs: $(SRC)
	node_modules/.bin/docco twig.js<commit_msg>Rename testext test to testphp<commit_after>SRC = src/twig.header.js src/twig.core.js src/twig.fills.js src/twig.lib.js src/twig.logic.js src/twig.expression.js src/twig.expression.operator.js src/twig.filters.js src/twig.functions.js src/twig.tests.js src/twig.exports.js src/twig.compiler.js src/twig.module.js

TESTS = test/*.js
TESTSEXT = test-ext/*.js
REPORTER = spec

all: twig.js twig.min.js

test:
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter $(REPORTER) \
		--timeout 100 \
		--growl \
		$(TESTS)

twig.php:
	./test-ext/checkout.sh

testphp: twig.php
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter $(REPORTER) \
		--timeout 100 \
		--growl \
		$(TESTSEXT)

twig.js: $(SRC)
	cat $^ > $@
	cp $@ demos/node_express/public/vendor/
	cp $@ demos/twitter_backbone/vendor/

twig.min.js: twig.js
	./node_modules/.bin/uglifyjs $< > $@

docs: test-docs annotated-docs

test-docs:
	@NODE_ENV=test ./node_modules/.bin/mocha \
		--require should \
		--reporter markdown \
		--timeout 100 \
		--growl \
		$(TESTS) > docs/tests.md

annotated-docs: $(SRC)
	node_modules/.bin/docco twig.js
{'fraction_non_alphanumeric': 0.17173051519154559, 'fraction_numerical': 0.007926023778071334, 'mean_word_length': 2.910499139414802, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '839562', 'n_tokens_mistral': 1012, 'n_tokens_neox': 935, 'n_words': 157}