Initial barcode scanner webapp
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>
This commit is contained in:
25
Makefile
Normal file
25
Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user