Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
docsify-pdf-converter
Advanced tools
npm install --save-dev docsify-pdf-converter
Create:
.docsifytopdfrc.<js|json|yaml>
"docsifytopdf"
field in package.json
(like rcfile can receive) with this setup object:Example .docsifytopdfrc.js
content:
module.exports = {
contents: [ "docs/_sidebar.md" ], // array of "table of contents" files path
pathToPublic: "pdf/readme.pdf", // path where pdf will stored
pdfOptions: "<options for puppeteer.pdf()>", // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
removeTemp: true, // remove generated .md and .html or not
emulateMedia: "screen", // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
}
Add script into package.json
:
{
"scripts": {
"convert": "node_modules/.bin/docsify-pdf-converter"
}
}
Run converter:
npm run convert
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧 This part of module is not safe for work - it will stop process after generation pdf. Use it for your own risk. You can just import and use main function like this:
const converter = require('docsify-pdf-converter');
const config = require('./.docsifytopdfrc.js');
converter(config) // right after resolve or reject inner promise your process will be terminated :C
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Your pull requests and issues are welcome!
FAQs
A magical pdf generator for docsify projects.
The npm package docsify-pdf-converter receives a total of 9 weekly downloads. As such, docsify-pdf-converter popularity was classified as not popular.
We found that docsify-pdf-converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.