Skip to content
/ cli Public

Simple code scaffolding tool using a Markdown file to define templates & properties

License

Notifications You must be signed in to change notification settings

scffld-dev/cli

Repository files navigation

scffld

NPM Version JSR

codecov Known Vulnerabilities

Simple code scaffolding tool utilising a single Markdown file to define templates & properties.

Why?

I wanted something that was a bit less complex than full-blown code generation tools like Yeoman, Angular Schematics etc.

Features

  • Local or remote templates
  • File templates can be written in any language you want - HTML, XML, CSS, SCSS, JavaScript, TypeScript, Python, Ruby, PHP, ColdFusion, COBOL ...
  • Output user-supplied properties in your templates, with conversion & conditional directives
  • Prompt the user for missing properties - enter a text string, yes/no for booleans; or choose from a list of options
  • Display custom messages & run commands after scaffolding
  • Generate template from existing files

Take a look at the template docs for full details.

Usage

Requires NodeJS 18+.

Quickstart

npx @scffld/cli@latest github:scffld-dev/cli/examples/simple \
    --name="My Awesome Component" \
    -o ./my-project/src/

Open in StackBlitz

(Windows users will need to remove \ and put everything on one line)

Files will be created in my-project/src

Example of command output

See docs/usage.md for more details or check out the example templates.