remark-mos

1.4.0 • Public • Published

remark-mos

Inject parts of markdown via hidden JavaScript snippets

NPM version Build status for master Test coverage for master

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

MIT © Zoltan Kochan


Dependencies Dependency status for master

  • run-async: Utility method to run function either synchronously or asynchronously using the common this.async() style.

Dev Dependencies devDependency status for master

  • @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

Package Sidebar

Install

npm i remark-mos

Weekly Downloads

6

Version

1.4.0

License

MIT

Last publish

Collaborators

  • zkochan