calvinfroedge / node-jspdf

jsPDF on the server.
14 stars 19 forks source link

Pin to jspdf version rather than getting the (possibly inconsistent) master version. #4

Closed rettops closed 8 years ago

rettops commented 8 years ago

The current node-jspdf from npm doesn't work, because that version of the node-jspdf code is not compatible with the master version of jspdf that it fetches. The github repo for node-jspdf has been updated to match the current version of jspdf, but that update hasn't yet made it to npm.

This change pins the fetched version of jspf to a known compatible version (the current 1.2.61 version). Once this makes it to npm, the node-jspdf installed by npm will work and continue to work even if there is a newer, incompatible jspdf version. Whenever there is a jspdf change that seems important enough to cause an update in node-jspdf, the compatibility should be checked, any necessary changes should be made, and the version number embedded in install.sh should be changed.

Without this, the current situation could recur where 'npm install node-jpdfs' gets a broken node-jspdf.

I also added a sample 'require' line to the readme.