scaffold

command module
v0.0.100 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 11 Imported by: 0

README

Scaffold

A Project Generation Tool


Scaffold is a project generation tool similar to cookiecutter written in Go that leverages the Go template engine to generate projects from a template. It is designed to be used with git or the local file system with a built in "scaffold" management system for versions and templates.

What set's Scaffold apart from projects like cookiecutter is the ability to define reusable scaffolds called template scaffolds within a project to help bootstrap code changes in existing projects.

You're able to use a .scaffolds directory within a project to define a scaffold that can generate files in multiple locations around your project. This is useful for generating boilerplate starter code for:

  • React/Vue/Angular/... components
  • Ansible Roles
  • CRUD API endpoint stubs
  • Other commonly structured code folders

See the examples folder for some examples of how to use Scaffold.

Core Features

  • Generate projects from a template
  • Git based scaffolds
    • Update scaffolds with scaffold update
    • List scaffolds with scaffold list
    • Pull specific tag or branch (currently always pulls latest)
  • Generate files in multiple locations within an existing project
  • Pre/Post Messages defined in the scaffold (supports markdown)
  • Alias support for shortening common commands
  • Shortcuts for common prefixes (e.g gh: for github.com)
  • Conditional Prompting based on user input
  • Inject snippets into existing files with Scaffold Templates
  • Feature flag support for blocking/enabling rendering of entire directories/glob matches

Credits

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
commands
Package commands containers all the commands for the application CLI
Package commands containers all the commands for the application CLI
core/engine
Package engine provides a simple templating engine for scaffolding projects.
Package engine provides a simple templating engine for scaffolding projects.
core/fsast
Package fsast provides a way to build an abstract syntax tree (AST) of a file system.
Package fsast provides a way to build an abstract syntax tree (AST) of a file system.
core/rwfs
Package rwfs provides a Read Write File System to extend the standard io/fs package with the ability to write to the file system.
Package rwfs provides a Read Write File System to extend the standard io/fs package with the ability to write to the file system.
scaffold
Package scaffold provides a simple way to scaffold a project from a template
Package scaffold provides a simple way to scaffold a project from a template
scaffold/pkgs
Package pkgs contains functions for parsing remote urls and checking if a directory is a git repository.
Package pkgs contains functions for parsing remote urls and checking if a directory is a git repository.
scaffold/pkgs/pkgurl
Package pkgurl contains functions for parsing remote urls
Package pkgurl contains functions for parsing remote urls
internal
huhext
Package huhext extends the standard charm/huh package with some additional input types.
Package huhext extends the standard charm/huh package with some additional input types.
styles
Package styles contains the shared styles for the terminal UI components.
Package styles contains the shared styles for the terminal UI components.
validators
Package validators contains the validation functions for the application.
Package validators contains the validation functions for the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL