markdown-exec
v1.0.2
Published
Execute commands in your Markdown and keep the output.
Downloads
27
Maintainers
Readme
Installation
yarn add markdown-exec --global
or
npm install markdown-exec --global
Usage
The markdown-exec
command takes one single argument: a file containing XML Comment API's annotations.
markdown-exec ./README.md
The command will process the content of the given file and will search for XML comments that has the following format:
<!-- markdown-exec() --><!-- /markdown-exec -->
Specify command to execute
Before:
<!-- markdown-exec(cmd:echo '123') --><!-- /markdown-exec -->
After:
<!-- markdown-exec(cmd:echo '123') -->123<!-- /markdown-exec -->
Use a regular expression to reduce the command output
Before:
<!-- markdown-exec(cmd:echo 'test123', match:\d+) --><!-- /markdown-exec -->
After:
<!-- markdown-exec(cmd:echo 'test123', match:\d+) -->123<!-- /markdown-exec -->
Tests
yarn test
- run all tests once.yarn test -- --watch
- run all tests and watch for changes.
Development
To start contributing to this project, please do:
- Fork and clone this repo.
- Do your work.
- Create a PR.
Releases
To release this project the following tasks should be done:
- Using np:
np
Made with :heart: by Rubens Mariuzzo.