0.1.3 • Published 3 years ago
@highland-farm/simple-quagga v0.1.3
Simple Quagga Barcode Scanner
Barcode scanner with sane defaults and lightweight interface, built on quagga2. Interfaces are not complete or final, but it is functional. Since quagga2 comes bundled it is included as a devDependency only.
Look in examples
to see how to use in browser as an iife script or esm module. Can also be used as a dependency when bundling for a lib or app. Uses snowpack for development and esbuild for transpiling/bundling/minifying.
Package folders:
/types
: TypeScript definitions/dist
: ESM & IIFE browser bundles/lib
: ESM module unbundled
NPM scripts:
npm start
to start snowpack dev server & launch examples in browser w/HMR for developmentnpm run build
to transpile to ./lib, check/write TS type declarations to ./types, & bundle esm/iife w/working examples folder to ./distnpm run lint
to check linting rules; also run as part of build (but not git hooks for now)npm run pretty:check
to check Prettier rules; not run automatically for nownpm run pretty
to apply Prettier rules; not run automatically for now
Working on:
- Actually read the TypeScript handbook and fix naïve or uninformed design choices
Backlog:
- Torch (flashlight) and zoom support for devices that support it
- Beeeeeeeeeeep. Beep
- Better scan quality checks (code component error thresholds) without custom format validator
- Decide if builder/options pattern is a good idea for init
- Testing, UTs, etc (you know, maybe... eventually)
- Intelligent selection of resolution and other options via MediaDevices.getSupportedConstraints()
- Camera device selection via MediaDevices.enumerateDevices()
- Check digit validation for code formats that support it
- Expose more Quagga config options
- Github actions to build, test, and publish
- QR codes (via quagg2-reader-qr or other)
- Possibly look into fixing Web Workers upstream
Done:
Eslint and consistent formattingBundle: Snowpack? Rollup? Just not browserifySomething other than python to server for local testingConsume Quagga2 without passing through dependencies to consumers of this wrapperConsider moving TS type declarations to a separate folderBlob handling for passing back captured video frames and overlaysMake repo public and push alpha version to npmjs