markdown-magic-pulpo-schema

1.0.1 • Public • Published

Schema plugin

Add install command to markdown files via markdown-magic

Install

npm i markdown-magic markdown-magic-install-command --save-dev

Adding the plugin

See example.js for usage.

const Pulpo = require('pulpo');
const path = require('path');
const markdownMagic = require('markdown-magic');

const config = {
  transforms: {
    SCHEMA: require('./index.js')(new Pulpo({
      host: {
        description: 'Host for the server',
        type: 'string',
        default: 'localhost',
        argv: 'host'
      },
      port: {
        description: 'Port for dev server to run on',
        type: 'number',
        default: '3000',
        env: 'PORT'
      }
    }))
  }
}

const markdownPath = path.join(__dirname, 'README.md');
markdownMagic(markdownPath, config);

Usage in markdown

  • host (string) - Host for the server
    • default - localhost
    • argv - host
  • port (number) - Port for dev server to run on
    • default - 3000
    • env - PORT

Package Sidebar

Install

npm i markdown-magic-pulpo-schema

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.56 kB

Total Files

4

Last publish

Collaborators

  • camacho