Skip to content
This repository has been archived by the owner on Nov 3, 2019. It is now read-only.

Latest commit

 

History

History

mos-plugin-snippet

mos-plugin-snippet

A mos plugin for embedding snippets from files

npm version

Installation

npm install --save mos-plugin-snippet

Usage example

In this markdown file there is this template code:

<!--@snippet('./test/fixtures/file-1.js#foo', { showSource: true })-->
<!--/@-->

And it is rendered into this snippet:

console.log('foo')
console.log('bar')

Excerpt from ./test/fixtures/file-1.js

API

  • snippet(snippetPath: string)
  • snippet(snippetPath: string, { showSource: bool })

License

MIT © Zoltan Kochan