mos-plugin-snippet
A mos plugin for embedding snippets from files
Installation
npm install --save mos-plugin-snippet
Usage example
In this markdown file there is this template code:
<!--@snippet('./src/test/file-1.js#foo', { showSource: true })--><!--/@-->
And it is rendered into this snippet:
consoleconsole
Excerpt from ./src/test/file-1.js
API
snippet(snippetPath: string)
snippet(snippetPath: string, { showSource: bool })