You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using HackMyResume as a dependency in my own website, building the output as my site is deployed. Since it's Heroku, I can't guarantee wkthmltopdf, phantomjs, etc are installed.
I can use phantomjs-prebuilt, so I edited html-pdf-cli-generator to check if phantomjs-prebuilt was installed, and used it instead:
let pathToBin = 'phantomjs';
// If the executable was installed in the node_modules directory of a
// project, and that project includes wkhtmltopdf, use that instance
// instead.
try {
const installed = detectInstalled.sync('phantomjs-prebuilt', {
cwd: process.cwd(),
local: true,
});
if (installed) {
pathToBin = PATH.join(process.cwd(), 'node_modules', '.bin', 'phantomjs');
}
} catch (e) {
return false;
}
SPAWN(pathToBin, [ scriptPath, sourcePath, destPath ], false, on_error, this);
Any thoughts on this approach, before I submit a PR?
The text was updated successfully, but these errors were encountered:
I'm using HackMyResume as a dependency in my own website, building the output as my site is deployed. Since it's Heroku, I can't guarantee
wkthmltopdf
,phantomjs
, etc are installed.I can use
phantomjs-prebuilt
, so I editedhtml-pdf-cli-generator
to check ifphantomjs-prebuilt
was installed, and used it instead:Any thoughts on this approach, before I submit a PR?
The text was updated successfully, but these errors were encountered: