<commit_before>name     = fkit
status  := $(shell git status --porcelain)
version := $(shell git describe --tags)
regex   := "s/\([\"\']version[\"\'][[:space:]]*:[[:space:]]*\)\([\"\'].*[\"\']\)/\1\"$(version)\"/g"

.PHONY: bump changelog clean dev dist doc lint publish publish-api publish-npm release test unit

dev:
	@node_modules/.bin/rollup -c -w

dist:
	@node_modules/.bin/rollup -c

test: unit lint

watch:
	@node_modules/.bin/jest --watch

release: dist test publish

publish: bump changelog publish-api publish-npm

unpublish: delete-tag unpublish-npm

clean:
	@rm -rf dist doc node_modules

node_modules:
	@npm install

# Runs the unit tests.
unit:
	@node_modules/.bin/jest

# Runs jslint.
lint:
	@node_modules/.bin/standard "*.js" "src/**/*.js" "test/**/*.js"

# Generates the API documentation.
doc:
	@node_modules/.bin/jsdoc -c jsdoc.config.json src README.md

# Bumps the version.
bump:
	@sed -i "" $(regex) package.json

# Updates the changelog and tags the release.
changelog:
	@git changelog -t "v$(version)"
	@git add --all .
	@git release "v$(version)"

delete-tag:
	@git tag --delete "v$(version)"
	@git push --delete origin "v$(version)"

# Publishes the API documentation.
publish-api: doc
	@test -z "$(status)"
	@git checkout gh-pages
	@git reset --hard origin/gh-pages<commit_msg>Don't pass args to standard<commit_after>name     = fkit
status  := $(shell git status --porcelain)
version := $(shell git describe --tags)
regex   := "s/\([\"\']version[\"\'][[:space:]]*:[[:space:]]*\)\([\"\'].*[\"\']\)/\1\"$(version)\"/g"

.PHONY: bump changelog clean dev dist doc lint publish publish-api publish-npm release test unit

dev:
	@node_modules/.bin/rollup -c -w

dist:
	@node_modules/.bin/rollup -c

test: unit lint

watch:
	@node_modules/.bin/jest --watch

release: dist test publish

publish: bump changelog publish-api publish-npm

unpublish: delete-tag unpublish-npm

clean:
	@rm -rf dist doc node_modules

node_modules:
	@npm install

# Runs the unit tests.
unit:
	@node_modules/.bin/jest

# Runs jslint.
lint:
	@node_modules/.bin/standard

# Generates the API documentation.
doc:
	@node_modules/.bin/jsdoc -c jsdoc.config.json src README.md

# Bumps the version.
bump:
	@sed -i "" $(regex) package.json

# Updates the changelog and tags the release.
changelog:
	@git changelog -t "v$(version)"
	@git add --all .
	@git release "v$(version)"

delete-tag:
	@git tag --delete "v$(version)"
	@git push --delete origin "v$(version)"

# Publishes the API documentation.
publish-api: doc
	@test -z "$(status)"
	@git checkout gh-pages
	@git reset --hard origin/gh-pages
{'fraction_non_alphanumeric': 0.17130703789636503, 'fraction_numerical': 0.0007733952049497294, 'mean_word_length': 3.695099818511797, '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': '577417', 'n_tokens_mistral': 967, 'n_tokens_neox': 943, 'n_words': 274}