New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

md-browser-preview

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

md-browser-preview

Preview markdown text in web browser. Compile .md into .html, then launch local web server and default web browser in your system. Compilation and reloading browser is automatically done when saving .md file.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

md-browser-preview

Preview markdown text in web browser. Compile .md into .html, then launch local web server and default web browser in your system. Compilation and reloading browser is automatically done when saving .md file.

Install

  • npm install -g md-browser-preview
  • md-browser-preview xxx.md

Usage

CLI

Usage:
> md-browser-preview [options] [filename]

Options:
  -o, --output   where to output compiled html file              [string] [default: false]
  -p, --port     port listen on for inner local web server        [number] [default: 5000]
  -b, --browser  web browser to launch in your system        [string] [default: "default"]
  -t, --title    title of generated html document [string] [default: "md-browser-preview"]
  -g, --gfm      use github favored markdown                     [boolean] [default: true]
  -s, --style   highlight.js style sheet name                [string] [default: "github"]
  -h, --help     show this help menu                                             [boolean]

Node.js Programming

Basic Usage

const MdBrowserPreview = require('md-browser-preview');

MdBrowserPreview.init({
    input: './target.md',
    output: '.'
});

Advanced Usage

const MdBrowserPreview = require('md-browser-preview');

// instanciate
let mbp = new MdBrowserPreview({
    input: './target.md',
    output: '.'
});

// compile, launch local server and browser, then start watching.
mbp.compile().then(() => {
    return mbp.serve();
}).then(() => {
    mbp.startWatch();
});

// exit local server and stop watching.
mbp.exit();

Development

  • git clone https://github.com/ytkj/md-browser-preview.git
  • cd md-browser-preview
  • npm install
  • npm link

FAQs

Package last updated on 05 May 2020

Did you know?

Socket

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.

Install

Related posts