Skip to content

Code Generation Tutorials

Tackle was originally built from cookiecutter, a very popular code scaffolding tool, and extends its functionality with additional language features such as modularity, conditionals and loops, reusable objects, and more. These tutorials aim to walk through some of the patterns that can be used to build anything from a lightweight single document code generator to a project scaffolding tool used to continually update project templates over time.

Sections

  • Basic Code Generation
    • Basic code generation / the generate hook
    • Flow control for code generation
  • Modular Code Generation
    • Calling code generating modules
    • Maintaining context between tackle providers
  • Partial Code Generation
    • Generating code in specific parts of documents
  • Stateful Code Generation
    • Maintaining state when running code generation
    • WIP

Examples

For those that learn best via examples, here are a few that should get the general point across: