/scaffdog

:dog: scaffdog is Markdown driven scaffolding tool.

Primary LanguageTypeScriptMIT LicenseMIT

scaffdog

scaffdog is Markdown driven scaffolding tool.

GitHub Workflow Status npm MIT LICENSE

scaffdog

DEMO

Multiple files can be output in a document, and flexible scaffolding is possible with a simple but powerful template syntax 🐕

Documentation

Visit https://scaff.dog to view the full documentation.

Features

  • 📝 Markdown driven
    • You can define a template with <h1> and code block.
    • It will be a Documetable template !
    • Define meta information with extended syntax using Front Matter.
  • 🗒️ 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.
  • 🚀 Ready to use
    • You can quickly start using $ scaffdog init.
    • Other useful commands are provided for immediate scaffolding.
  • 💅 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.

Requirements

  • Node.js v14.16.0+

Getting Started

Installation

scaffdog can be installed globally, but we recommend installing it locally on the project.

$ npm install --save-dev scaffdog

Quick Start

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.

$ npx scaffdog init

? Please enter a document name. hello

Setup of scaffdog 🐶 is complete!

  ✔ .scaffdog/config.js
  ✔ .scaffdog/hello.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/hello.md file should have been generated.

Let's scaffold using the hello document!

$ npx scaffdog generate hello

? Please select the output destination directory. .
? Please enter any text. pretty-dog

🐶 Generated 1 file!

     ✔ pretty-dog.md

Congratulations 🎉

The first file was generated.

$ cat pretty-dog.md

Let's make a document!
See scaffdog documentation for details.
https://scaff.dog/docs/templates

Please refer to this document and customize the document file 👍

Migration

There are important changes in the major update.

See Migration Guide.

Contributing

See CONTRIBUTING.md.

License

MIT © wadackel

Thank you for reading!