<commit_before>MKFILE_PATH=$(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR=$(dir $(MKFILE_PATH))
BUILDER=$(MKFILE_DIR)builder/bin/cmd.coffee
BUILDER_BASEDIR?=--basedir "$(MKFILE_DIR)"
BUILDER_BASEURL?=--baseurl "/a/p/p"
BUILDER_USE?=--use "$(MKFILE_DIR)*/bant.json"
BUILDER_GLOBALS?=--globals-file "$(MKFILE_DIR)globals.coffee"
BUILDER_CONFIG?=--config-file "$(MKFILE_DIR).config.json"
BUILDER_OUTDIR?=--outdir "$(MKFILE_DIR)../website/a/p/p/"
BUILDER_THIRDPARTY_DIR?=--thirdparty-dir "$(MKFILE_DIR)thirdparty"
BUILDER_ASSETS_DIR?=--assets-dir "$(MKFILE_DIR)assets"
EXTRAS?=
BUILDER_ARGS=\
	$(BUILDER_BASEDIR) \
	$(BUILDER_BASEURL) \
	$(BUILDER_USE) \
	$(BUILDER_GLOBALS) \
	$(BUILDER_CONFIG) \
	$(BUILDER_ASSETS_DIR) \
	$(BUILDER_THIRDPARTY_DIR) \
	$(BUILDER_OUTDIR) \
	$(EXTRAS)
BUILDER_DEBUG_FLAGS?=--debug-js --debug-css
BUILDER_WATCH_FLAGS?=--watch-js --watch-css --watch-sprites
BUILDER_MINIFY_FLAGS?=--minify-css --minify-js --collapse-js
BUILDER_EXT_SOURCEMAPS_FLAGS?=--extract-js-sourcemaps --debug-js
BUILDER_EXCLUDE_TESTRUNNER_FLAG?=--exclude-testrunner

all: landing development

dist: landing production

unit-tests: landing minify-with-unit-tests

vanilla:
	$(BUILDER) $(BUILDER_ARGS)

debug:
	$(BUILDER) -v $(BUILDER_DEBUG_FLAGS) $(BUILDER_ARGS)

watch:
	$(BUILDER) -v $(BUILDER_WATCH_FLAGS) $(BUILDER_ARGS)

development: watch

production:
	NODE_ENV=production \
	$(BUILDER) -v \
		$(BUILDER_MINIFY_FLAGS) \
		$(BUILDER_EXT_SOURCEMAPS_FLAGS) \
		$(BUILDER_EXCLUDE_TESTRUNNER_FLAG) \
		$(BUILDER_ARGS)

minify-with-unit-tests:
	NODE_ENV=production \
	$(BUILDER) -v $(BUILDER_MINIFY_FLAGS) $(BUILDER_EXT_SOURCEMAPS_FLAGS) $(BUILDER_ARGS)

minify:
	$(BUILDER) $(BUILDER_MINIFY_FLAGS) $(BUILDER_ARGS) $(BUILDER_EXCLUDE_TESTRUNNER_FLAG)

landing:
	$(MAKE) -C landing

test:
	$(MAKE) -C test

.PHONY: landing test<commit_msg>Add node_modules target to client/Makefile<commit_after>MKFILE_PATH=$(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR=$(dir $(MKFILE_PATH))
BUILDER=$(MKFILE_DIR)builder/bin/cmd.coffee
BUILDER_BASEDIR?=--basedir "$(MKFILE_DIR)"
BUILDER_BASEURL?=--baseurl "/a/p/p"
BUILDER_USE?=--use "$(MKFILE_DIR)*/bant.json"
BUILDER_GLOBALS?=--globals-file "$(MKFILE_DIR)globals.coffee"
BUILDER_CONFIG?=--config-file "$(MKFILE_DIR).config.json"
BUILDER_OUTDIR?=--outdir "$(MKFILE_DIR)../website/a/p/p/"
BUILDER_THIRDPARTY_DIR?=--thirdparty-dir "$(MKFILE_DIR)thirdparty"
BUILDER_ASSETS_DIR?=--assets-dir "$(MKFILE_DIR)assets"
EXTRAS?=
BUILDER_ARGS=\
	$(BUILDER_BASEDIR) \
	$(BUILDER_BASEURL) \
	$(BUILDER_USE) \
	$(BUILDER_GLOBALS) \
	$(BUILDER_CONFIG) \
	$(BUILDER_ASSETS_DIR) \
	$(BUILDER_THIRDPARTY_DIR) \
	$(BUILDER_OUTDIR) \
	$(EXTRAS)
BUILDER_DEBUG_FLAGS?=--debug-js --debug-css
BUILDER_WATCH_FLAGS?=--watch-js --watch-css --watch-sprites
BUILDER_MINIFY_FLAGS?=--minify-css --minify-js --collapse-js
BUILDER_EXT_SOURCEMAPS_FLAGS?=--extract-js-sourcemaps --debug-js
BUILDER_EXCLUDE_TESTRUNNER_FLAG?=--exclude-testrunner
CLIENT=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SCRIPTS=$(CLIENT)/../scripts

all: development landing

dist: landing production

unit-tests: landing minify-with-unit-tests

vanilla:
	$(BUILDER) $(BUILDER_ARGS)

debug:
	$(BUILDER) -v $(BUILDER_DEBUG_FLAGS) $(BUILDER_ARGS)

watch:
	$(BUILDER) -v $(BUILDER_WATCH_FLAGS) $(BUILDER_ARGS)

development: node_modules watch

production:
	NODE_ENV=production \
	$(BUILDER) -v \
		$(BUILDER_MINIFY_FLAGS) \
		$(BUILDER_EXT_SOURCEMAPS_FLAGS) \
		$(BUILDER_EXCLUDE_TESTRUNNER_FLAG) \
		$(BUILDER_ARGS)

minify-with-unit-tests:
	NODE_ENV=production \
	$(BUILDER) -v $(BUILDER_MINIFY_FLAGS) $(BUILDER_EXT_SOURCEMAPS_FLAGS) $(BUILDER_ARGS)

minify:
	$(BUILDER) $(BUILDER_MINIFY_FLAGS) $(BUILDER_ARGS) $(BUILDER_EXCLUDE_TESTRUNNER_FLAG)

node_modules:
	$(SCRIPTS)/check-node_modules.sh $(CLIENT) || $(SCRIPTS)/install-npm.sh
	$(SCRIPTS)/check-node_modules.sh builder   || $(SCRIPTS)/install-npm.sh -d builder
	$(SCRIPTS)/check-node_modules.sh landing   || $(SCRIPTS)/install-npm.sh -d landing

landing:
	$(MAKE) -C landing

test:
	$(MAKE) -C test

.PHONY: node_modules landing test
{'fraction_non_alphanumeric': 0.16564567507963734, 'fraction_numerical': 0.0, 'mean_word_length': 6.173989455184534, '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': '1148810', 'n_tokens_mistral': 1705, 'n_tokens_neox': 1744, 'n_words': 223}