remark-mos
v1.4.0
Published
Inject parts of markdown via hidden JavaScript snippets
Downloads
55
Maintainers
Readme
remark-mos
Inject parts of markdown via hidden JavaScript snippets
Installation
This module is installed via npm:
npm install remark-mos --save
Usage
'use strict'
const remark = require('@zkochan/remark')
const remarkMos = require('remark-mos')
const scope = {
foo: () => 'Hello world!',
}
const processor = remark.use(remarkMos, { scope, useStrict: true })
const markdown = '<!--@foo()--><!--/@-->'
processor.process(markdown).then(res => console.log(res.result))
//> <!--@foo()-->
// Hello world!
// <!--/@-->
License
Dependencies
- run-async: Utility method to run function either synchronously or asynchronously using the common
this.async()
style.
Dev Dependencies
- @zkochan/remark: Markdown processor powered by plugins
- 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
- tonic-example: Tonic example generator
- validate-commit-msg: Script to validate a commit message follows the conventional changelog standard