scaffdog is Markdown driven scaffolding tool.
npm install scaffdog
scaffdog is Markdown driven scaffolding tool.

Multiple files can be output in a document, and flexible scaffolding is possible with a simple but powerful template syntax :dog2:
Visit https://scaff.dog to view the full documentation.
- :pencil: Markdown driven
- You can define a template with and code block.
- It will be a Documetable template !
- Define meta information with extended syntax using Front Matter.
- :spiral_notepad: Intuitive template
- It provides a simple yet powerful template engine inspired by ECMAScript and Go text/template.
- Many built-in helper functions required to define templates are also provided.
- :rocket: Ready to use
- You can quickly start using $ scaffdog init.
- Other useful commands are provided for immediate scaffolding.
- :nail_care: Prettier Integration
- Markdown works very well with Prettier, and the templates maintain beautiful code.
- We also offer a Prettier Plugin for scaffdog's template engine.
- Node.js v18.0.0+
scaffdog can be installed globally, but we recommend installing it locally on the project.
``bash`
$ npm install --save-dev scaffdog
In the following tutorial you can start using scaffdog immediately !
#### Setup
By default, it stores the document file and configuration file in the .scaffdog directory.
Creating directories, configuration file and initial documents can be done with the init subcommand.
`bash
$ npx scaffdog init
? Please enter a document name. component
Setup of scaffdog š¶ is complete!
ā .scaffdog/config.js
ā .scaffdog/component.md
Now you can do scaffold by running $ scaffdog generate.
Please refer to the following documents and customize it.
https://scaff.dog/docs/templates
`
After running the command, the .scaffdog/component.md file should have been generated. Rewrite that file as follows:
``markdown
---
name: 'component'
root: '.'
output: '.'
questions:
name: 'Please enter a component name.'
---
`typescript`
export * from './{{ inputs.name }}';
`typescript
export type Props = React.PropsWithChildren<{}>;
export const {{ inputs.name | pascal }}: React.FC
return (
{children}
);
};
```
Let's scaffold using the component document!
`bash
$ npx scaffdog generate
? Please select a document. component
ā¹ Output destination directory: "."
? Please enter a component name. PrettyDog
š¶ Generated 2 files!
ā PrettyDog/index.ts
ā PrettyDog/PrettyDog.tsx
`
Congratulations :tada:
The first file was generated.
`bash
$ cat PrettyDog/index.ts
export * from './PrettyDog';
$ cat PrettyDog/PrettyDog.tsx
export type Props = React.PropsWithChildren<{}>;
export const PrettyDog: React.FC
return (
{children}
);
};
``
Check out our documentation site to customize your documentation :+1:
There are important changes in the major update.
- To v4 from v3
- To v3 from v2
- To v2 from v1
- To v1 from v0
See Migration Guide.
See CONTRIBUTING.md.
See CHANGELOG.md.