markdown-magic-pulpo-schema
v2.1.0
Published
Document configurations built with Pulpo
Maintainers
Readme
Schema plugin
Add install command to markdown files via markdown-magic
Install
npm i markdown-magic markdown-magic-install-command --save-devAdding the plugin
See example.ts for usage.
import path from 'path';
import Pulpo from 'pulpo';
import { markdownMagic } from 'markdown-magic';
import SCHEMA from './index.ts';
const config = {
matchWord: 'AUTO-GENERATED-CONTENT',
transforms: {
SCHEMA: SCHEMA(
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(import.meta.dirname, 'README.md');
await 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
