Skip to content
📦@parcel-bundler plugin for loader markdown string, markdown output HTML.
Branch: master
Clone or download
Latest commit 6a68d3e May 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Update example. Dec 15, 2018
test Modify test example. Apr 29, 2018
.gitignore Init project. Mar 16, 2018
.npmignore Init project. Mar 16, 2018
MarkdownAsset.js Fix windows support issues. #4 Dec 15, 2018
README.md Support Markdown output HTML. #3 Oct 26, 2018
index.js Init project. Mar 16, 2018
package-lock.json released v1.3.5 May 3, 2019
package.json released v1.3.5 May 3, 2019

README.md

parcel-plugin-markdown-string

Parcel plugin for loader markdown string.

Use

Install the plugin

npm install parcel-plugin-markdown-string --save-dev

Import your markdown files!

import MarkdownString from './Markdown.md';

console.log(MarkdownString) // => Output markdown string.

If you want to convert directly to HTML, you need to set marked options in package.json.

{
  "name": "example",
  "marked": {
    "breaks": true,
    "pedantic": false,
    "gfm": true,
    "tables": true,
    "sanitize": false,
    "smartLists": true,
    "smartypants": false,
    "xhtml": false
    // ...
  },
}

Import Markdown output HTML!

import HTMLString from './Markdown.md';

console.log(HTMLString) // => Output HTML string.
document.body.innerHTML = html;

Test

npm run test
You can’t perform that action at this time.