<commit_before>BUILD_DIR = build

PREFIX = .
SRC_DIR = ${PREFIX}/src
DIST_DIR = ${PREFIX}/dist


JS_ENGINE ?= `which node nodejs`
COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe
POST_COMPILER = ${JS_ENGINE} ${BUILD_DIR}/post-compile.js

SRC = ${SRC_DIR}/jsonselect.js
DIST = ${DIST_DIR}/jsonselect.js
DIST_MIN = ${DIST_DIR}/jsonselect.min.js

${DIST_DIR}:
	@@mkdir -p ${DIST_DIR}

all: hint project min
	@@echo "Project build complete."

project: ${DIST}

${DIST}: ${SRC} | ${DIST_DIR}
	@@echo "Building" ${DIST}
	@@echo ${SRC}
	@@cat ${SRC} > ${DIST};


min: project ${DIST_MIN}

${DIST_MIN}: ${DIST}
	@@if test ! -z ${JS_ENGINE}; then \
		echo "Minifying Project" ${DIST_MIN}; \
		${COMPILER} ${DIST} > ${DIST_MIN}.tmp; \
		${POST_COMPILER} ${DIST_MIN}.tmp > ${DIST_MIN}; \
		rm -f ${DIST_MIN}.tmp; \
	else \<commit_msg>surpress stdout when trying to find detect nodejs<commit_after>BUILD_DIR = build

PREFIX = .
SRC_DIR = ${PREFIX}/src
DIST_DIR = ${PREFIX}/dist


JS_ENGINE ?= `which node nodejs 2> /dev/null`
COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe
POST_COMPILER = ${JS_ENGINE} ${BUILD_DIR}/post-compile.js

SRC = ${SRC_DIR}/jsonselect.js
DIST = ${DIST_DIR}/jsonselect.js
DIST_MIN = ${DIST_DIR}/jsonselect.min.js

${DIST_DIR}:
	@@mkdir -p ${DIST_DIR}

all: hint project min
	@@echo "Project build complete."

project: ${DIST}

${DIST}: ${SRC} | ${DIST_DIR}
	@@echo "Building" ${DIST}
	@@echo ${SRC}
	@@cat ${SRC} > ${DIST};


min: project ${DIST_MIN}

${DIST_MIN}: ${DIST}
	@@if test ! -z ${JS_ENGINE}; then \
		echo "Minifying Project" ${DIST_MIN}; \
		${COMPILER} ${DIST} > ${DIST_MIN}.tmp; \
		${POST_COMPILER} ${DIST_MIN}.tmp > ${DIST_MIN}; \
		rm -f ${DIST_MIN}.tmp; \
	else \
{'fraction_non_alphanumeric': 0.20538326506729082, 'fraction_numerical': 0.0005851375073142189, 'mean_word_length': 4.480769230769231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '3880785', 'n_tokens_mistral': 742, 'n_tokens_neox': 671, 'n_words': 155}