0.1.3 • Published 3 years ago

@highland-farm/simple-quagga v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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 development
  • npm run build to transpile to ./lib, check/write TS type declarations to ./types, & bundle esm/iife w/working examples folder to ./dist
  • npm 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 now
  • npm run pretty to apply Prettier rules; not run automatically for now

115135950-49331d80-9fd1-11eb-988b-5705bad3dc14

Working on:

  1. Actually read the TypeScript handbook and fix naïve or uninformed design choices

Backlog:

  1. Torch (flashlight) and zoom support for devices that support it
  2. Beeeeeeeeeeep. Beep
  3. Better scan quality checks (code component error thresholds) without custom format validator
  4. Decide if builder/options pattern is a good idea for init
  5. Testing, UTs, etc (you know, maybe... eventually)
  6. Intelligent selection of resolution and other options via MediaDevices.getSupportedConstraints()
  7. Camera device selection via MediaDevices.enumerateDevices()
  8. Check digit validation for code formats that support it
  9. Expose more Quagga config options
  10. Github actions to build, test, and publish
  11. QR codes (via quagg2-reader-qr or other)
  12. Possibly look into fixing Web Workers upstream

Done:

  1. Eslint and consistent formatting
  2. Bundle: Snowpack? Rollup? Just not browserify
  3. Something other than python to server for local testing
  4. Consume Quagga2 without passing through dependencies to consumers of this wrapper
  5. Consider moving TS type declarations to a separate folder
  6. Blob handling for passing back captured video frames and overlays
  7. Make repo public and push alpha version to npmjs