Package Exports
- examplify
- examplify/examplify.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (examplify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
examplify
Amplify your Markdown documentation with executable examples.
Introduction
examplify allows you to write Markdown documentation with executable examples.
It helps you to ensure that your examples are always in sync with executable JavaScript or presentable HTML output.
If you like examplify, check out lazui at lazui.org for activating
your Markdown files.
Installation
Local
npm install -g examplifyAnd use the file examplify.js in your project.
CDN
<script src="https://esm.sh/examplify"></script>Usage
This Markdown:
```!html
<script>console.log('Hello, World!');</script>
```Will be turned into this:
```html
<script>console.log('Hello, World!');</script>
```
<script>console.log('Hello, World!');</script>And this Markdown:
```!html
<form><input type="text" value="Hello, World!"></form>
```Will actually render as this:
```html
<form><input type="text" value="Hello, World!"></form>
```
Prior to handing a string to a Markdown parser, pass it through examplify. Any code blocks
marked as !html will be processed and the internals insefted immediately after the code block.
import { examplify } from 'examplify';
const string = "```!html\n<script>console.log('Hello, World!');</script>\n```";
const examplified = examplify(string);
console.log(examplified);
// => "```html\n<script>console.log('Hello, World!');</script>\n```\n<script>console.log('Hello, World!');</script>"License
MIT
Release History (reverse chronological order)
2021-10-19 v0.0.1 Initial Release.