Maybe this tutorial helps you?
Add package to package.json file and then use npm install command. Offcourse you need node and npm installed your instance.
Hi,
I'm totally new with Laravel's "dependencies", and this far I've only used native "laravel" -wrapped packages. For these packages the installation process has been simple: just "composer require" the laravel -modified package and add the service provider to the list and everything has just worked out of box.
However, now I'd need to start using PDFKit -package, which does not have laravel-wrapped package (http://pdfkit.org). I of course can complete the npm install step, but as the instructions go to the following part ...
"Creating a PDFKit document is quite simple. Just require the pdfkit module in your CoffeeScript or JavaScript source file and create an instance of the PDFDocument class.
PDFDocument = require 'pdfkit' doc = new PDFDocument"
... I'm a bit lost.
The question is: Where and how should I add that "PDFDocument = require 'pdfkit' -line in Laravel? I suppose I'd have to use bootstrap.js file, but that only leads into errors.
From where could I learn more about how to utilize node / js dependencies with Laravel?
Thank you,
Please or to participate in this conversation.