remark-sources

1.1.0 • Public • Published

remark-sources

Inject source code to markdown files.

Install

npm install --save-dev remark-sources

Usage

const remark = require('remark');
const sources = require('remark-sources');
const input = '```js (index.js)\n```'; // (path to file in round brackets)
const options = {};
const output = remark().use(sources, options).processSync(input).toString();

Output:

// this is index.js content

Options

const defaultOptions = {};

Package Sidebar

Install

npm i remark-sources

Weekly Downloads

14

Version

1.1.0

License

MIT

Unpacked Size

3.98 kB

Total Files

4

Last publish

Collaborators

  • iamthes