0.1.1 • Published 5 years ago

@viewdoc/markup-demo v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@viewdoc/markup-demo

A tool to create demo files for markup syntax

It turns this:

// markup-start

> This is an example.

// markup-end

into this:

```
> This is an example.
```

> This is an example.

Install

$ npm install @viewdoc/markup-demo

Usage

const { buildMarkup } = require('@viewdoc/markup-demo')
const path = require('path')

const main = async () => {
  await buildMarkup({
    srcDirPath: path.join(__dirname, 'src'),
    outDirPath: __dirname,
    srcExtensions: ['.md'],
    generateSrc: (markup) => {
      return [
        '````',
        markup,
        '````',
      ].join('')
    }
  })
}

if (require.main === module) {
  main()
    .catch((err) => {
      console.error(err)
      process.exit(1)
    })
}
0.1.1

5 years ago

0.1.0

5 years ago