<commit_before>.PHONY: folders lib test
SHELL = /bin/bash

SRC=src
TEST=test
DIST=dist
DIST_TEST=$(DIST)/$(TEST)

lib: folders
	@echo "building gml library..."
	@( pushd $(SRC); cp -r tsconfigs/lib.json tsconfig.json; tsc; popd ) > /dev/null
	@( pushd $(SRC); cp -r tsconfigs/dec.json tsconfig.json; tsc; popd ) > /dev/null

lib2d: folders
	@echo "building gml2d library..."
	@( pushd $(SRC); cp -r tsconfigs/lib2d.json tsconfig.json; tsc; popd ) > /dev/null
	@( pushd $(SRC); cp -r tsconfigs/dec2d.json tsconfig.json; tsc; popd ) > /dev/null

folders:
	@mkdir -p $(DIST)
	@mkdir -p $(DIST)/lib
	@mkdir -p $(DIST_TEST)

test: update lib
	@echo "setting up tests..."
	@cp -rf $(TEST)/* $(DIST_TEST)/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && npm install && popd > /dev/null
	@cp -f dist/gml.js $(DIST_TEST)/perf/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && ./node_modules/.bin/karma start && popd > /dev/null

update:
	@echo "updating vendor & library code...";
	@( pushd $(TEST)/vendor > /dev/null && sh update.sh && popd > /dev/null )
<commit_msg>CI test to not depend on building lib<commit_after>.PHONY: folders lib test
SHELL = /bin/bash

SRC=src
TEST=test
DIST=dist
DIST_TEST=$(DIST)/$(TEST)

lib: folders
	@echo "building gml library..."
	@( pushd $(SRC); cp -r tsconfigs/lib.json tsconfig.json; tsc; popd ) > /dev/null
	@( pushd $(SRC); cp -r tsconfigs/dec.json tsconfig.json; tsc; popd ) > /dev/null

lib2d: folders
	@echo "building gml2d library..."
	@( pushd $(SRC); cp -r tsconfigs/lib2d.json tsconfig.json; tsc; popd ) > /dev/null
	@( pushd $(SRC); cp -r tsconfigs/dec2d.json tsconfig.json; tsc; popd ) > /dev/null

folders:
	@mkdir -p $(DIST)
	@mkdir -p $(DIST)/lib
	@mkdir -p $(DIST_TEST)

test-local: update lib
	@echo "setting up tests..."
	@cp -rf $(TEST)/* $(DIST_TEST)/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && npm install && popd > /dev/null
	@cp -f dist/gml.js $(DIST_TEST)/perf/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && ./node_modules/.bin/karma start && popd > /dev/null

test:
	@echo "setting up tests..."
	@cp -rf $(TEST)/* $(DIST_TEST)/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && npm install && popd > /dev/null
	@cp -f dist/gml.js $(DIST_TEST)/perf/ > /dev/null
	@pushd $(DIST_TEST) > /dev/null && ./node_modules/.bin/karma start && popd > /dev/null

update:
	@echo "updating vendor & library code...";
	@( pushd $(TEST)/vendor > /dev/null && sh update.sh && popd > /dev/null )

{'fraction_non_alphanumeric': 0.19761709120788826, 'fraction_numerical': 0.003286770747740345, 'mean_word_length': 3.3482142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '542929', 'n_tokens_mistral': 1020, 'n_tokens_neox': 978, 'n_words': 260}