-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
Thank you for submitting an issue to jsPDF. Please read carefully.
Are you using the latest version of jsPDF?
using commit 2c35e16
Have you tried using jspdf.debug.js?
yes
Steps to reproduce
alert(jsPDF.version)
What I saw
undefined
What I expected
the version number
Solution proposal
this issue comes from the fact that jspdf.line
jsPDF.version = ("${versionID}" === ("${vers" + "ionID}")) ? "0.0.0" : "${versionID}";
is executed by the bundler and therefore the placeholder is replaced by 0.0.0. I propose simply put the placeholder here.
jsPDF.version = "${versionID}";
I furtheron propose to take the versionID from git describe
This could be done in build.js line 89
var version = execSync('git describe').toString().trim()
maybe it makes sense to patch package.json in build.js as well. The advantage is clear: no double maintenance of version numbers!
as a pity index.html is distorted when the version string is too long. The upper right part needs to be recoded such that it is more robust, e.g. like this: