
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Generate beautiful PDF documentation from code
//**
or ##**
comments)defg
merges comments into your README/markdown file, updating it.defg
uses plugins to generate a beautifully formatted PDF.As you update the documentation in the code, defg
will find and merge the
updates, always keeping your markdown and PDF documentation up to date. You can
add images, styling, and layout to the markdown and defg
will still find and
merge your updates correctly.
Below is a schematic of how this works:
defg
is a npm script and can be installed globally using:
$> npm install -g defg
Then enter the directory where your README.md is present, and run
$> defg
You can get help using:
$> defg -h
I find that README's and other documentations tend to get out of
date quickly. defg
generates a README from documentation
comments, and as these comments are close
to the code, they are easier to access, modify, and update.
If you start your documentation with a title, subtitle, and image, the default plugin will create a cover page for you.
//** # Use a Heading as the Title
//** The next line is a subtitle (optional), followed by a logo
//** 
It will also pull version number, author, and homepage from NodeJS package.json
files.
If you run defg
and there is no README.md file, it will generate one from
all the documentation it has found. During this process, because it has no reference,
it can get the order of comments mixed up. If this happens, you need to reorder
the README to get it into shape.
You can also update your document to make it more readable. You can:
As you do all these, defg
will preserve your changes whenever it updates your document.
<img..
tag. You can also
add other block HTML styling <div class="..."
in the document to improve it's look.<div class="insert-block">...</div>
.<div class="page-break" />
and add the style to your CSS:
.page-break {
page-break-after: always
}
pages.defg
file. Here you can decide the page
size, header & footer using the following Puppeteer options: https://pptr.dev/api/puppeteer.pdfoptions$> defg -h
# Generates beautiful PDF documentation from documentation comments
# (Comments starting with //** or ##**)
Options
-h, --help: show help
-v, --version: show version
--src: glob paths to source files [can be multiple]
--skip: glob paths to exclude/ignore when searching source files
--ext: list of valid source file extensions (js,py,java,sql,ts,sh,go,c,cpp by default)
--readme: path of README file to merge (./README.md by default)
--style: path of CSS file containing styling (./README.css by default)
--page-def: path of file containing pdf page definition
--pdf: path of output pdf generated (./README.pdf by default)
--ignore-src: ignore source and just generate PDF from README.md
--quick: use faster (but less accurate) resolution algorithm
--plugin: update the documentation or style using this plugin
FAQs
Generate beautiful PDF documentation from code
The npm package defg receives a total of 1 weekly downloads. As such, defg popularity was classified as not popular.
We found that defg 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
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.