Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

leandrodaf/liquidjs-barcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

liquidjs-barcode

Plugin developed to generate barcode using liquify

Below the scenes, the plugin uses the bwip-js package, it is possible to use all configuration parameters.

Usage

npm i liquidjs-barcode
const { Liquid } = require("liquidjs");
const liquidjsBarcode = require("liquidjs-barcode");

const liquid = new Liquid();

liquid.plugin(liquidjsBarcode());

const template = `{{ barCode | barcode: "bcid: 'code128', scale: 3, height: 10, includetext: true, textxalign: 'center'" }}`;

const data = {
  barCode: "1234-foo"
};

const html = await liquid.parseAndRender(template, data);