<commit_before>default: build
all: build doc

MODULE = Mario

build: dist/$(MODULE).js
deps: bower_components
doc: docs/README.md

SRC = $(shell find src -name '*.purs' -type f | sort)

NPM = $(shell command -v npm || { echo "npm not found."; exit 1; })
PSC = $(shell command -v psc || { echo "PureScript compiler (psc) not found."; exit 1; })
PSCDOCS = $(shell command -v psc-docs || { echo "Purescript doc generator (psc-docs) not found."; exit 1; })
PSCBUNDLE = $(shell command -v psc-bundle || { echo "Purescript bundler (psc-bundle) not found."; exit 1; })

NPM_BIN = $(shell npm bin)
BOWER = $(NPM_BIN)/bower

$(BOWER):
	npm install bower

dist/$(MODULE).js: bower_components $(SRC) $(FFI)
	mkdir -p "$(@D)"
	$(PSC) \
		'bower_components/purescript-*/src/**/*.purs' \
		$(SRC) \
		--verbose-errors
	$(PSCBUNDLE) \
		'output/**/*.js' \
		--output dist/$(MODULE).js \
		--module $(MODULE).Main \
		--main $(MODULE).Main

.PHONY: default all build deps doc clean

docs/README.md: bower_components $(SRC)
	mkdir -p '$(@D)'
	$(PSCDOCS) \
		--docgen $(MODULE) \
		'bower_components/purescript-*/src/**/*.purs'
		$(SRC) >'$@'

node_modules:
	$(NPM) install
	touch -cm node_modules

bower_components: $(BOWER)
	$(BOWER) install
	touch -cm bower_components

clean:
	rm -rf dist bower_components node_modules .psci_modules output<commit_msg>Fix `Makefile`<commit_after>default: build
all: build doc

MODULE = Mario

build: dist/$(MODULE).js
deps: bower_components
doc: docs/README.md

SRC = $(shell find src -name '*.purs' -type f | sort)

NPM = $(shell command -v npm || { echo "npm not found."; exit 1; })
PURS = $(shell command -v purs || { echo "PureScript compiler (purs) not found."; exit 1; })

NPM_BIN = $(shell npm bin)
BOWER = $(NPM_BIN)/bower

$(BOWER):
	npm install bower

dist/$(MODULE).js: bower_components $(SRC) $(FFI)
	mkdir -p "$(@D)"
	$(PURS) compile \
		'bower_components/purescript-*/src/**/*.purs' \
		$(SRC) \
		--verbose-errors
	$(PURS) bundle \
		'output/**/*.js' \
		--output dist/$(MODULE).js \
		--module $(MODULE).Main \
		--main $(MODULE).Main

.PHONY: default all build deps doc clean

docs/README.md: bower_components $(SRC)
	mkdir -p '$(@D)'
	$(PURS) docs \
		--docgen $(MODULE) \
		'bower_components/purescript-*/src/**/*.purs'
		$(SRC) >'$@'

node_modules:
	$(NPM) install
	touch -cm node_modules

bower_components: $(BOWER)
	"$(BOWER)" install
	touch -cm bower_components

clean:
	rm -rf dist bower_components node_modules .psci_modules output
{'fraction_non_alphanumeric': 0.18424242424242424, 'fraction_numerical': 0.0024242424242424242, 'mean_word_length': 3.671698113207547, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '428795', 'n_tokens_mistral': 987, 'n_tokens_neox': 945, 'n_words': 258}