Scaffold Runtime Config
Scaffold RC is the runtime configuration file that can be used to define some default values and perform some basic enhancements to the scaffolding process. Your scaffoldrc path is defined by:
- The
--scaffoldrcflag - the
SCAFFOLDRCenvironment variable
Defaults to ~/.scaffold/scaffoldrc.yml
settings
The settings section allows you to define some global settings for the scaffolding process. These can be any key/value string pairs
Example
settings:
theme: scaffoldtheme
The Theme settings allows the user to set the default theme for the scaffolding process. Options include
scaffold(default)charmdraculabase16catppuccino
run_hooks
You may disable hooks globally by setting run_hooks to never, or choose to be prompted before they run by setting it to prompt. The --run-hooks CLI setting takes precedence. Options include:
always- run hooks without promptingnever- never run hooks without promptingprompt- prompt before running hooks (default)
Example
settings:
run_hooks: promptdefaults
The defaults section allows you to set some default values for the scaffolding process. These can be any key/value string pairs
defaults:
name: Joe Bagadonuts
github_username: joebagadonuts
email: joebags@donus.gonutsaliases
The aliases section allows you to define key/value pairs as shortcuts for a scaffold path. This is useful to shorten a reference for a specific scaffold.
aliases:
api: ~/local-scaffolds/api
component: ~/local-scaffolds/componentThen you can use the alias in the scaffold command
scaffold new apishorts
The shorts section allows you to define expandable text snippets. Commonly these would be used to prefix a URL or path.
shorts:
gh: https://github.com/
gl: https://gitlab.com/Then you can use the alias in the scaffold command
scaffold new gh:joebagadonuts/my-projectWhich will expand to
scaffold new https://github.com/joebagadonuts/my-projectauth
The auth sections lets you define authentication matchers for your scaffolds. This is useful for using scaffolds that are stored in a private repository.
The configuration supports basic authentication and token authentication. Note that in most cases, you want basic authentication, even us you're using a personal access token.
auth:
- match: github.com/private-repo/*
basic:
username: joebagadonuts
password: ${GITHUB_PASSWORD} # this will be replaced with the environment variable
- match: gitea.com/private-repo/*
token: ${GITEA_TOKEN} # this will be replaced with the environment variableTIP
the match key supports regular expressions giving you a lot of flexibility in defining your matchers.