<commit_before>RAVEN = ./src/raven.js
BASE64 = ./src/vendor/base64.js
CRYPTO = ./src/vendor/crypto-sha1-hmac.min.js
VER = $(shell cat version.txt)
RAVEN_MIN = ./dist/raven-${VER}.min.js
TMP = /tmp/raven.js

COMPRESSOR ?= `which yuicompressor`

#
# Build the compressed all-in-one file
#

raven:
	mkdir -p dist

	# Generate the compressed file
	cat ${BASE64} ${CRYPTO} ${RAVEN} | \
		sed "s/@VERSION/${VER}/" | \
		${COMPRESSOR} --type js > ${RAVEN_MIN}

	# Prepend the tiny header to the compressed file
	echo "/* Raven.js v${VER} | https://github.com/lincolnloop/raven-js/ */" | \
		cat - ${RAVEN_MIN} > ${TMP}
	mv ${TMP} ${RAVEN_MIN}<commit_msg>Generate both a full and a minified distribution<commit_after>RAVEN = ./src/raven.js
BASE64 = ./src/vendor/base64.js
CRYPTO = ./src/vendor/crypto-sha1-hmac.min.js
VER = $(shell cat version.txt)
RAVEN_FULL = ./dist/raven-${VER}.js
RAVEN_MIN = ./dist/raven-${VER}.min.js
TMP = /tmp/raven.min.js

COMPRESSOR ?= `which yuicompressor`

#
# Build the compressed all-in-one file
#

raven:
	mkdir -p dist

	# Generate the full and compressed distributions
	cat ${BASE64} ${CRYPTO} ${RAVEN} | \
		sed "s/@VERSION/${VER}/" > ${RAVEN_FULL}

	cat ${RAVEN_FULL} | ${COMPRESSOR} --type js > ${RAVEN_MIN}

	# Prepend the tiny header to the compressed file
	echo "/* Raven.js v${VER} | https://github.com/lincolnloop/raven-js/ */" | \
		cat - ${RAVEN_MIN} > ${TMP}
	mv ${TMP} ${RAVEN_MIN}
{'fraction_non_alphanumeric': 0.18181818181818182, 'fraction_numerical': 0.009866102889358703, 'mean_word_length': 3.507936507936508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '7399066', 'n_tokens_mistral': 601, 'n_tokens_neox': 560, 'n_words': 129}