Using MetorKitchen to create MeteorJS app - swiftly

http://laskut.meteor.com/ is based on the MeteorKitchen example-invoices app https://github.com/perak/kitchen-examples/tree/master/example-invoices. It will be made available as a public project in the new MeteorKitchen GUI after it’s release. Now you can find it’s source at GitHub https://github.com/ljack/meteorkitchen-invoices-poc-pdf-i18n.

Some technical details

Invoices app uses Meteor Packages listed in laskuni.json#L3654.

It also uses one NPM package pdfmake to create the PDF invoice printouts.

It’s localized using the tap:i18n meteor package. Translation files are in JSON-format. Check for the tap:i18n for more information.

It uses the awesome JsBarcode to generate virtual barcode image into the PDF invoice printout. JsBarcode is used as is. That is without any meteor packaging. So the JsBarcod.all.min.js is copied by MeteorKitchen into CLIENT_DIR/compatibility/JsBarcode.all.min.js so that Meteor knows to the properly handle the JS file and to make JsBarcode work correctly.

Both the PDFs and the barcodes used in those are generated in the client-side (aka in the browser). PDFs are generated using JavaScript defined in external JS-files which are integrated by specifying copy_files in Meteor Kitchen, see laskuni.json#L3628.

All external files are in files/ where they are copied into the Meteor project by MeteorKitchen according to the rules.

← Blog