<commit_before>SPEC_DIR := spec
SPECFILES := $(shell find $(SPEC_DIR) -iname '*.js')
SOURCE_DIR := src
SOURCES := $(shell find $(SOURCE_DIR) -iname '*.js')
LINTEDFILES := $(SOURCES) $(SPECFILES)
BUILD_DIR := build
ESM_FILE := $(BUILD_DIR)/quantities.esm.js
UMD_FILE := $(BUILD_DIR)/quantities.js
DIST_FILES := $(ESM_FILE) $(UMD_FILE)
BANNER := $(shell cat LICENSE)

NPM_BIN := $(shell npm bin)
ROLLUP := $(NPM_BIN)/rollup
JASMINE := $(NPM_BIN)/jasmine
ESLINT := $(NPM_BIN)/eslint

build: $(DIST_FILES)

$(UMD_FILE): $(SOURCES)
	$(ROLLUP) --file=$(UMD_FILE) \
            --format=umd \
            --name=Qty \
            --banner="`echo '/*'; cat LICENSE; echo '*/'`" \
            src/quantities.js

$(ESM_FILE): $(SOURCES)
	$(ROLLUP) --file=$(ESM_FILE) \
            --format=es \
            --name=Qty \
            --banner="`echo '/*'; cat LICENSE; echo '*/'`" \
            src/quantities.js

test: lint build
	$(JASMINE)

lint: $(LINTEDFILES)
	$(ESLINT) $(LINTEDFILES)

bench:
	bin/bench.rb

clean:
	rm -f $(DIST_FILES)

.PHONY: bench build clean lint test<commit_msg>Drop useless `name` argument for ES module build<commit_after>SPEC_DIR := spec
SPECFILES := $(shell find $(SPEC_DIR) -iname '*.js')
SOURCE_DIR := src
SOURCES := $(shell find $(SOURCE_DIR) -iname '*.js')
LINTEDFILES := $(SOURCES) $(SPECFILES)
BUILD_DIR := build
ESM_FILE := $(BUILD_DIR)/quantities.esm.js
UMD_FILE := $(BUILD_DIR)/quantities.js
DIST_FILES := $(ESM_FILE) $(UMD_FILE)
BANNER := $(shell cat LICENSE)

NPM_BIN := $(shell npm bin)
ROLLUP := $(NPM_BIN)/rollup
JASMINE := $(NPM_BIN)/jasmine
ESLINT := $(NPM_BIN)/eslint

build: $(DIST_FILES)

$(UMD_FILE): $(SOURCES)
	$(ROLLUP) --file=$(UMD_FILE) \
            --format=umd \
            --name=Qty \
            --banner="`echo '/*'; cat LICENSE; echo '*/'`" \
            src/quantities.js

$(ESM_FILE): $(SOURCES)
	$(ROLLUP) --file=$(ESM_FILE) \
            --format=es \
            --banner="`echo '/*'; cat LICENSE; echo '*/'`" \
            src/quantities.js

test: lint build
	$(JASMINE)

lint: $(LINTEDFILES)
	$(ESLINT) $(LINTEDFILES)

bench:
	bin/bench.rb

clean:
	rm -f $(DIST_FILES)

.PHONY: bench build clean lint test
{'fraction_non_alphanumeric': 0.1948291782086796, 'fraction_numerical': 0.0, 'mean_word_length': 3.080979284369115, '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': '7067093', 'n_tokens_mistral': 890, 'n_tokens_neox': 835, 'n_words': 177}