1.1.10 • Published 4 years ago

barcode-lovebox v1.1.10

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

qrcode-lovebox

Create and format a QRCode for the Lovebox.

Installation

npm install qrcode-lovebox

On macOs at least I needed to install it this way due to node-canvas package. CXX=clang++ npm install qrcode-lovebox Heroku buildback can fail to install this package.

Node-canvas

If you have trouble installing node-canvas package: see section compiling of https://github.com/Automattic/node-canvas I installed it with CXX=clang++ npm install canvas on macOS. On linux I don't know if it causes any issue.

Some software are require: https://github.com/Automattic/node-canvas#compiling

Usage

npm script

  • npm run build Builds the source file into dist/ with tsc. You have to run this before publishing a new version. Node will ignore lib/index.ts

  • npm run debug For testing purpose, it runs dist/index.js

debug functions

DEBUGArrayToPng and DEBUGCanvasToPng create a PNG file from a Canvas object or a monochromatic (one byte per pixel) array

Node

Publish

You have to modify the version in package.json before publishing with npm publish Modifying the version can be done by hand or with npm version <new version number>

The source file: lib/index.ts is not published. Make sure you ran npm run build before you publish.

1.1.10

4 years ago