2.1.3 • Published 8 years ago
mos-plugin-snippet v2.1.3
mos-plugin-snippet
A mos plugin for embedding snippets from files
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
Dependencies
- babel-runtime: babel selfContained runtime
Dev Dependencies
- babel-cli: Babel command line.
- babel-plugin-add-module-exports: Fix babel/babel#2212
- babel-plugin-transform-runtime: Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babel-register: babel require hook
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- cz-conventional-changelog: Commitizen adapter following the conventional-changelog format.
- eslint: An AST-based pattern checker for JavaScript.
- eslint-config-standard: JavaScript Standard Style - ESLint Shareable Config
- eslint-plugin-promise: Enforce best practices for JavaScript promises
- eslint-plugin-standard: ESlint Plugin for the Standard Linter
- ghooks: Simple git hooks
- istanbul: Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests
- mocha: simple, flexible, fun test framework
- mos: A pluggable module that injects content into your markdown files via hidden JavaScript snippets
- semantic-release: automated semver compliant package publishing
- validate-commit-msg: Script to validate a commit message follows the conventional changelog standard