Camera-based barcode scanner using ZXing for decoding. Requests wide video (256x2048), rotates to landscape for decoding, applies contrast boost and tries both HybridBinarizer and GlobalHistogramBinarizer. Includes camera selector, manual/auto focus controls, and focus slider. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
452 B
Makefile
26 lines
452 B
Makefile
DEST ?= dist
|
|
|
|
SRC = index.html app.mjs
|
|
|
|
.PHONY: all build deploy clean
|
|
|
|
all: build
|
|
|
|
node_modules/.package-lock.json: package.json
|
|
npm install
|
|
@touch $@
|
|
|
|
vendor/zxing.min.js: node_modules/.package-lock.json
|
|
@mkdir -p vendor
|
|
cp node_modules/@zxing/library/umd/index.min.js vendor/zxing.min.js
|
|
|
|
build: vendor/zxing.min.js
|
|
|
|
deploy: build
|
|
@mkdir -p $(DEST)/vendor
|
|
cp $(SRC) $(DEST)/
|
|
cp vendor/zxing.min.js $(DEST)/vendor/
|
|
|
|
clean:
|
|
rm -rf vendor dist
|