<commit_before>BIN = ./node_modules/.bin
TESTS = $(shell find test -name "*Test.coffee")

build:
	@echo "Creating folders"
	@mkdir -p lib
	@mkdir -p build

	@$(BIN)/grunt compile

test: build
	@NODE_ENV=testing ./node_modules/.bin/mocha \
	  -r should -r coffee-script \
	  --reporter spec --timeout 2000 \
	  ./test/server.coffee $(TESTS)

clean:
	@rm -rf lib
	@rm -rf build

define release
	VERSION=`node -pe "require('./package.json').version"` && \
	NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \
	node -e "\
		var j = require('./package.json');\
		j.version = \"$$NEXT_VERSION\";\
		var s = JSON.stringify(j, null, 2);\
		require('fs').writeFileSync('./package.json', s);" && \
	node -e "\
		var j = require('./bower.json');\
		j.version = \"$$NEXT_VERSION\";\
		var s = JSON.stringify(j, null, 2);\
		require('fs').writeFileSync('./bower.json', s);" && \
	git commit -m "release $$NEXT_VERSION" -- package.json bower.json && \
	git tag "$$NEXT_VERSION" -m "release $$NEXT_VERSION"
endef

release-patch: build test
	@$(call release,patch)

release-minor: build test
	@$(call release,minor)

release-major: build test
	@$(call release,major)

publish:
	git push --tags origin HEAD:master
	npm publish
	bower publish<commit_msg>Removed invalid bower command<commit_after>BIN = ./node_modules/.bin
TESTS = $(shell find test -name "*Test.coffee")

build:
	@echo "Creating folders"
	@mkdir -p lib
	@mkdir -p build

	@$(BIN)/grunt compile

test: build
	@NODE_ENV=testing ./node_modules/.bin/mocha \
	  -r should -r coffee-script \
	  --reporter spec --timeout 2000 \
	  ./test/server.coffee $(TESTS)

clean:
	@rm -rf lib
	@rm -rf build

define release
	VERSION=`node -pe "require('./package.json').version"` && \
	NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \
	node -e "\
		var j = require('./package.json');\
		j.version = \"$$NEXT_VERSION\";\
		var s = JSON.stringify(j, null, 2);\
		require('fs').writeFileSync('./package.json', s);" && \
	node -e "\
		var j = require('./bower.json');\
		j.version = \"$$NEXT_VERSION\";\
		var s = JSON.stringify(j, null, 2);\
		require('fs').writeFileSync('./bower.json', s);" && \
	git commit -m "release $$NEXT_VERSION" -- package.json bower.json && \
	git tag "$$NEXT_VERSION" -m "release $$NEXT_VERSION"
endef

release-patch: build test
	@$(call release,patch)

release-minor: build test
	@$(call release,minor)

release-major: build test
	@$(call release,major)

publish:
	git push --tags origin HEAD:master
	npm publish
{'fraction_non_alphanumeric': 0.19754065846886157, 'fraction_numerical': 0.005553351844506148, 'mean_word_length': 3.4955436720142603, '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': '3118191', 'n_tokens_mistral': 959, 'n_tokens_neox': 892, 'n_words': 234}