<commit_before>SHELL		?= /usr/env/bin/bash
BOWER		?= node_modules/.bin/bower
GRUNT		?= ./node_modules/.bin/grunt
PHANTOMJS	?= ./node_modules/.bin/phantomjs
SRC_DIR = src
DOC_DIR = doc
DOC_TEMP = doc-temp
PLUGIN_DIR = plugins
NDPROJ_DIR = ndproj

STROPHE 	= strophe.js
STROPHE_MIN = strophe.min.js

all: normal min
normal: stamp-bower $(STROPHE)
min: stamp-bower $(STROPHE_MIN)

stamp-npm: package.json
	npm install
	touch stamp-npm

stamp-bower: stamp-npm bower.json
	$(BOWER) install
	touch stamp-bower

$(STROPHE): stamp-bower
	@@echo "Building" $(STROPHE) "..."
	$(GRUNT) concat
	@@echo

$(STROPHE_MIN): $(STROPHE)
	@@echo "Building" $(STROPHE_MIN) "..."
	$(GRUNT) min

doc:
	@@echo "Building Strophe documentation..."
	@@if [ ! -d $(NDPROJ_DIR) ]; then mkdir $(NDPROJ_DIR); fi
	@@if [ ! -d $(DOC_DIR) ]; then mkdir $(DOC_DIR); fi
	@@if [ ! -d $(DOC_TEMP) ]; then mkdir $(DOC_TEMP); fi
	@@cp $(STROPHE) $(DOC_TEMP)
	@@naturaldocs -r -ro -q -i $(DOC_TEMP) -i $(PLUGIN_DIR) -o html $(DOC_DIR) -p $(NDPROJ_DIR)
	@@echo "Documentation built."
	@@echo

release:
	@@$(GRUNT) release
	@@echo "Release created."
	@@echo

check:: stamp-bower normal
	$(PHANTOMJS) node_modules/qunit-phantomjs-runner/runner-list.js tests/strophe.html

clean:
	rm -f stamp-npm stamp-bower
	rm -rf node_modules bower_components
	@@echo "Cleaning" node_modules "..."
	@@rm -rf node_modules
	@@echo "Cleaning" $(STROPHE) "..."
	@@rm -f $(STROPHE)
	@@echo "Cleaning" $(STROPHE_MIN) "..."
	@@rm -f $(STROPHE_MIN)
	@@echo "Cleaning minified plugins..."
	@@rm -f $(PLUGIN_FILES_MIN)
	@@echo "Cleaning documentation..."
	@@rm -rf $(NDPROJ_DIR) $(DOC_DIR) $(DOC_TEMP)
	@@echo "Done."
	@@echo

.PHONY: all normal min doc release clean check<commit_msg>Always rebuild strophe.js and strophe.min.js<commit_after>SHELL		?= /usr/env/bin/bash
BOWER		?= node_modules/.bin/bower
GRUNT		?= ./node_modules/.bin/grunt
PHANTOMJS	?= ./node_modules/.bin/phantomjs
SRC_DIR = src
DOC_DIR = doc
DOC_TEMP = doc-temp
PLUGIN_DIR = plugins
NDPROJ_DIR = ndproj

STROPHE 	= strophe.js
STROPHE_MIN = strophe.min.js

all: normal min
normal: stamp-bower $(STROPHE)
min: stamp-bower $(STROPHE_MIN)

stamp-npm: package.json
	npm install
	touch stamp-npm

stamp-bower: stamp-npm bower.json
	$(BOWER) install
	touch stamp-bower

$(STROPHE)::
	make stamp-bower
	@@echo "Building" $(STROPHE) "..."
	$(GRUNT) concat
	@@echo

$(STROPHE_MIN)::
	make $(STROPHE)
	@@echo "Building" $(STROPHE_MIN) "..."
	$(GRUNT) min

doc:
	@@echo "Building Strophe documentation..."
	@@if [ ! -d $(NDPROJ_DIR) ]; then mkdir $(NDPROJ_DIR); fi
	@@if [ ! -d $(DOC_DIR) ]; then mkdir $(DOC_DIR); fi
	@@if [ ! -d $(DOC_TEMP) ]; then mkdir $(DOC_TEMP); fi
	@@cp $(STROPHE) $(DOC_TEMP)
	@@naturaldocs -r -ro -q -i $(DOC_TEMP) -i $(PLUGIN_DIR) -o html $(DOC_DIR) -p $(NDPROJ_DIR)
	@@echo "Documentation built."
	@@echo

release:
	@@$(GRUNT) release
	@@echo "Release created."
	@@echo

check:: stamp-bower normal
	$(PHANTOMJS) node_modules/qunit-phantomjs-runner/runner-list.js tests/strophe.html

clean:
	rm -f stamp-npm stamp-bower
	rm -rf node_modules bower_components
	@@echo "Cleaning" node_modules "..."
	@@rm -rf node_modules
	@@echo "Cleaning" $(STROPHE) "..."
	@@rm -f $(STROPHE)
	@@echo "Cleaning" $(STROPHE_MIN) "..."
	@@rm -f $(STROPHE_MIN)
	@@echo "Cleaning minified plugins..."
	@@rm -f $(PLUGIN_FILES_MIN)
	@@echo "Cleaning documentation..."
	@@rm -rf $(NDPROJ_DIR) $(DOC_DIR) $(DOC_TEMP)
	@@echo "Done."
	@@echo

.PHONY: all normal min doc release clean check $(STROPHE) $(STROPHE_MIN)
{'fraction_non_alphanumeric': 0.1817403708987161, 'fraction_numerical': 0.0, 'mean_word_length': 4.171091445427729, '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': '577784', 'n_tokens_mistral': 1491, 'n_tokens_neox': 1450, 'n_words': 349}