Overview

mk-Scaffold takes a template provided as a directory structure with template-files. Templates can be located in the filesystem, or a VCS-Server (Git) like GitHub or GitLab.

It reads a settings file, also called the “questions” file, and prompts the user interactively whether or not to change the settings.

It then takes the template files and the answers to the questions and generates an output directory structure from it.

Changes from cookiecutter

  • Templated material is located in a template folder and no longer a templated folder (eg: { cookiecutter.project_name })

  • Template configuration file is now a yaml file and no longer json.

  • Questions can be asked conditionally.

  • Questions can be have input restrictions, such as a min or max length.

  • To avoid third party hooks, actions such a file removal on conditional is standard now.

Structure

This is a directory structure for a simple scaffold project:

scaffold-something/
├── template/                     <--------- Project template
│   └── ...
├── blah.txt                      <--------- Non-templated files/dirs
│                                            go outside
│
└── scaffold.yml                  <--------- Prompts & default values

You must have:

  • A scaffold.yml file.

  • A template/ directory.

Beyond that, you can have whatever files/directories you want.

See https://gitlab.com/cappysan/scaffolds/python-template for a real-world example of this.