<commit_before>STATIC_DIR = ./scribbler/static/scribbler
LIBS_DIR = ${STATIC_DIR}/libs
# Library versions
JQUERY_VERSION = '1.8.3'
REQUIRE_VERSION = '2.1.4'
CODEMIRROR_VERSION = '2.38'

fetch-static-libs:
	# Fetch JS library dependencies
	# Requires wget
	wget http://code.jquery.com/jquery-${JQUERY_VERSION}.js
	mv jquery-${JQUERY_VERSION}.js ${LIBS_DIR}/jquery.js
	wget http://requirejs.org/docs/release/${REQUIRE_VERSION}/comments/require.js
	mv require.js ${LIBS_DIR}/require.js
	wget http://codemirror.net/codemirror-${CODEMIRROR_VERSION}.zip
	unzip codemirror-${CODEMIRROR_VERSION}.zip
	rm -r ${LIBS_DIR}/codemirror
	mkdir -p ${LIBS_DIR}/codemirror
	mv -f codemirror-${CODEMIRROR_VERSION}/* ${LIBS_DIR}/codemirror
	rm -r codemirror-${CODEMIRROR_VERSION}
	rm codemirror-${CODEMIRROR_VERSION}.zip

build-css:
	# Build CSS from LESS
	# Requires LESS and r.js optimizer
	lessc --yui-compress ${STATIC_DIR}/less/scribbler.less ${STATIC_DIR}/css/scribbler.css
	cd ${STATIC_DIR}/css && r.js -o cssIn=scribbler.css out=scribbler.css

lint-js:
	# Check JS for any problems
	# Requires jshint
	jshint ${STATIC_DIR}/js/djangohint.js
	jshint ${STATIC_DIR}/js/scribbler.js
	jshint ${STATIC_DIR}/js/scribbler-editor.js
	jshint ${STATIC_DIR}/js/scribbler-menu.js

build-js:<commit_msg>Handle missing directories in some of the make commands.<commit_after>STATIC_DIR = ./scribbler/static/scribbler
LIBS_DIR = ${STATIC_DIR}/libs
# Library versions
JQUERY_VERSION = '1.8.3'
REQUIRE_VERSION = '2.1.4'
CODEMIRROR_VERSION = '2.38'

fetch-static-libs:
	# Fetch JS library dependencies
	# Requires wget
	wget http://code.jquery.com/jquery-${JQUERY_VERSION}.js
	mv jquery-${JQUERY_VERSION}.js ${LIBS_DIR}/jquery.js
	wget http://requirejs.org/docs/release/${REQUIRE_VERSION}/comments/require.js
	mv require.js ${LIBS_DIR}/require.js
	wget http://codemirror.net/codemirror-${CODEMIRROR_VERSION}.zip
	unzip codemirror-${CODEMIRROR_VERSION}.zip
	rm -rf ${LIBS_DIR}/codemirror
	mkdir -p ${LIBS_DIR}/codemirror
	mv -f codemirror-${CODEMIRROR_VERSION}/* ${LIBS_DIR}/codemirror
	rm -r codemirror-${CODEMIRROR_VERSION}
	rm codemirror-${CODEMIRROR_VERSION}.zip

build-css:
	# Build CSS from LESS
	# Requires LESS and r.js optimizer
	mkdir -p ${STATIC_DIR}/css
	lessc --yui-compress ${STATIC_DIR}/less/scribbler.less ${STATIC_DIR}/css/scribbler.css
	cd ${STATIC_DIR}/css && r.js -o cssIn=scribbler.css out=scribbler.css

lint-js:
	# Check JS for any problems
	# Requires jshint
	jshint ${STATIC_DIR}/js/djangohint.js
	jshint ${STATIC_DIR}/js/scribbler.js
	jshint ${STATIC_DIR}/js/scribbler-editor.js
	jshint ${STATIC_DIR}/js/scribbler-menu.js

build-js:
{'fraction_non_alphanumeric': 0.14176829268292682, 'fraction_numerical': 0.006859756097560976, 'mean_word_length': 4.993150684931507, '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': '2285236', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1049, 'n_words': 180}