Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Converts GitHub flavored markdown files to html and provides a web editor to live preview
Node.js project
Version: 0.0.1
With this module you can mimic the GitHub documentation style to work in a local machine so you don't need to publish your project to GitHub to have a nice documentation.
You can convert GitHub flavored markdown files to html and start a local server to edit and preview them in real-time. Hence, you don't need to authenticate to your GitHub account to use their preview api, you just write your markdown file locally and simply push the project when you're done.
A possible documentation methodology could be to start a local server, a.k.a. your documentation server. You can navigate through your project source files and open them to see their content. You can create new markdown files, edit, live preview, save them and save the generated html files. Therefore, you can edit the documentation via browser and see the html result in real-time.
npm install gfm
//Converts markdown files to html
var gfm = require ("gfm");
gfm.generate (".", function (error){
if (error) return console.log (error);
});
//Starts a local server to live preview
var gfm = require ("gfm");
gfm.live (".", 4040);
The module can be required and used from the API but it can also be used from CLI if you install it globally:
Usage: gfm [options]
Options:
-h, --help output usage information
-s, --source <path> source file or directory where the markdown files
are localed [.]
-g, --generate converts GitHub flavored markdown files to
highlighted html
-d, --destination <path> destination file or directory where the html files
are generated [. if source is a directory, removed
.md and ended in .html if source is a file]
-e, --exclude <paths> excludes files and directories
-c, --compact generates single html files without external
resources
-l, --live starts a local server to live preview the markdown
files
-p, --port <number> local server port number [4040]
Some examples:
Generate with src
as source directory and docs
as destination directory:
$ gfm -g -s src -d docs
Generate with src
as source directory, docs
as destination directory but create single html files for every markdown file (embedded resources):
$ gfm -g -c -s src -d docs
Convert file.md
to a compacted file.html
file:
$ gfm -g -c -s file.md
Generate markdown files located at .
and exclude node_modules
and test/README.md
:
$ gfm -g -e node_modules,test/README.md
Start a local server with .
as source directory and port 1234:
$ gfm -l -p 1234
gfm.generate(src[, settings], callback)
Converts GitHub flavored markdown files to html. The callback receives a possible error.
The source can be a directory or a file.
The possible settings are:
.
.gfm_res
will be created with all the external dependencies. Default is false
.
gfm.live([src][, port])
TODO, not yet implemented
gfm.silent
If true
no messages will be printed to console. Default is true
if it's used from the API and false
if it's used from the CLI.
FAQs
Converts GitHub flavored markdown files to html and provides a web editor to live preview
The npm package gfm receives a total of 70 weekly downloads. As such, gfm popularity was classified as not popular.
We found that gfm 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.