mos-plugin-snippet

2018-10-11 admin

mos-plugin-snippet是什么

什么是mos-plugin-snippet,A mos plugin for embedding snippets from files

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-42389.html

文章标题:mos-plugin-snippet

回到顶部