Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-invoicer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-invoicer

cli to genarate simple invoices from html template

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

html-invoicer

CLI to genarate simple invoices from html template

Install

npm i -g html-invoicer

Usage

invoice --tmpl path/to/template.html --data path/to/data --out path/to/output.pdf --any 12 --kind "of additional" --params possible

Parameters

ParameterTypeRequiredDescription
--tmplStringYesTemplate: a relative or absolute path to an html file.
Templates can use es6 string interpolation syntax for variables: ${varname}
--dataStringYes

Data: a relative or absolute path to a js or json file. A js file can return either an object or a function.

If a js data file exports a function, this function get passed all the command line parameters as an object. The function must then return an object with all the variables needed by the template
--outStringYesOutput file: the pdf destination file

Any additional parameters will be passed to the js data function — in case it is actually a function — and can be used to craft the template variables object — as stated before.

A complete example of a template.html file, a data.js file and the resulting invoice.pdf file can be found under the example directory.

Keywords

FAQs

Package last updated on 22 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc