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

mosjs/mos-plugin-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mos-plugin-snippet

A mos plugin for embedding snippets from files

NPM version Build status for master Test coverage for master

Installation

This module is installed via npm:

npm install mos-plugin-snippet --save

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


Dependencies Dependency status for master

Dev Dependencies devDependency status for master

About

A mos plugin for embedding snippets from files

Resources

License

Stars

Watchers

Forks

Packages

No packages published