1.1.1 • Published 6 months ago
gulp-file2qr v1.1.1
gulp-file2qr
This Gulp plugin build QRCode from data in source files (now from .url files, and from other file types in the future).
Contents
Install
npm install --save-dev gulp-file2qr
Examples
Create PNG QRCode from .url files with default settings
url2qr
can create PNG QRCodes from .url files.
import { url2qr } from '#gulp-file2qr';
import GulpClient from 'gulp';
function task1() {
return GulpClient.src('fixtures/*.url')
.pipe(url2qr())
.pipe(GulpClient.dest('output'));
};
task1.description = 'Test gulp task for creating PNG QR codes';
GulpClient.task(task1);
.url files — INI files. For example:
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=https://github.com/IT-Service-NPM/gulp-file2qr
QRCode:
Create QRCode in streaming mode with scale
Read .url files in streaming mode
and create PNG QRCodes with scale = 10
:
import { url2qr } from '#gulp-file2qr';
import GulpClient from 'gulp';
function task1() {
return GulpClient.src('fixtures/*.url', { buffer: false })
.pipe(url2qr({ qrOptions: { scale: 10 }, buffer: false }))
.pipe(GulpClient.dest('output', { encoding: false }));
};
task1.description = 'Test gulp task for creating PNG QR codes';
GulpClient.task(task1);
QRCode:
API
Please, read the API reference.