<commit_before>SHELL := /bin/bash

setup:
	git pull && \
	cd _octopress && \
	bundle exec rake setup_github_pages\[git@github.<EMAIL>:kvz/phpjs.git\] && \
	cd .. ; \

test: build
	#node tests/cli.js --debug --abort # To abort at first failure
	cd tests && npm install
	node bin/phpjs.js --action test --debug

# Apply code standards
cleanup:
	@[ -x `which gjslint` ] || sudo easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
	fixjsstyle \
		--recurse ./ \
		--exclude_directories _octopress,experimental,workbench,tests/node_modules,tools \
		--max_line_length 100 \
		--nojsdoc \
		--error_trace \
		--strict \
		--jslint_error all

npm:
	node bin/phpjs.js --action buildnpm --output build/npm.js
	ls -al build/npm.js
	node build/npm.js
	echo "Build success. "

publish: npm
	npm publish

build: npm

hook:
	mkdir -p ~/.gittemplate/hooks
	curl https://raw.github.com/kvz/ochtra/master/pre-commit -o ~/.gittemplate/hooks/pre-commit<commit_msg>Exclude more<commit_after>SHELL := /bin/bash

setup:
	git pull && \
	cd _octopress && \
	bundle exec rake setup_github_pages\[git@<EMAIL>:kvz/phpjs.git\] && \
	cd .. ; \

test: build
	#node tests/cli.js --debug --abort # To abort at first failure
	cd tests && npm install
	node bin/phpjs.js --action test --debug

# Apply code standards
cleanup:
	@[ -x `which gjslint` ] || sudo easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
	fixjsstyle \
		--recurse ./ \
		--exclude_directories _octopress,lib,build,experimental,workbench,tests/node_modules,tools \
		--max_line_length 100 \
		--nojsdoc \
		--error_trace \
		--strict \
		--jslint_error all

npm:
	node bin/phpjs.js --action buildnpm --output build/npm.js
	ls -al build/npm.js
	node build/npm.js
	echo "Build success. "

publish: npm
	npm publish

build: npm

hook:
	mkdir -p ~/.gittemplate/hooks
	curl https://raw.github.com/kvz/ochtra/master/pre-commit -o ~/.gittemplate/hooks/pre-commit
{'fraction_non_alphanumeric': 0.1435137895812053, 'fraction_numerical': 0.0030643513789581204, 'mean_word_length': 3.141649048625793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1124847', 'n_tokens_mistral': 774, 'n_tokens_neox': 731, 'n_words': 164}