Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leandrodaf/liquidjs-barcode
https://github.com/leandrodaf/liquidjs-barcode
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/leandrodaf/liquidjs-barcode
- Owner: leandrodaf
- Created: 2020-02-05T01:32:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T20:56:47.000Z (almost 2 years ago)
- Last Synced: 2023-12-25T19:04:29.109Z (about 1 year ago)
- Language: JavaScript
- Size: 653 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# liquidjs-barcode
Plugin developed to generate barcode using liquify
Below the scenes, the plugin uses the [bwip-js](https://github.com/metafloor/bwip-js#working-with-bwip-js-methods) package, it is possible to use all configuration parameters.
# Usage
```shel
npm i liquidjs-barcode
``````javascript
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);
```