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

reactmd-brunch

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactmd-brunch

This brunch plugin will compile markdown files into a React component.

latest
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

reactmd-brunch

This brunch plugin will compile markdown files into a React component.

Installation

$ npm install reactmd-brunch

Usage

import { Component } from 'react';
import MarkdownContent from './content.md'

export default class MyComponent extends Component {
  render() {
    return (
      <div>
        <h1>Heading</h1>
        <MarkdownContent />
      </div>
    );
  }
}

Replacements

Given markdown file that looks like this:

# Lorem ipsum dolor sit amet!

Lorem ipsum dolor sit amet, {{TOKEN1}} elit. Recusandae minus, doloremque [{{TOKEN2}}]({{TOKEN3}})
import { Component } from 'react';
import MarkdownContent from './content.md'

const replacements = {
  TOKEN1: 'consectetur adipisicing',
  TOKEN2: 'adipisci assumenda dolore',
  TOKEN3: 'adipisci eligendi',
};

export default class MyComponent extends Component {
  render() {
    return (
      <div>
        <h1>Heading</h1>
        <MarkdownContent replacements={replacements} />
      </div>
    );
  }
}

FAQs

Package last updated on 30 Mar 2017

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