mos-plugin-snippet

2.1.3 • Public • Published

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('./src/test/file-1.js#foo', { showSource: true })-->
<!--/@-->

And it is rendered into this snippet:

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

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

API

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

License

MIT © Zoltan Kochan

Readme

Keywords

Package Sidebar

Install

npm i mos-plugin-snippet

Weekly Downloads

43

Version

2.1.3

License

MIT

Last publish

Collaborators

  • zkochan