The only scaffolding tool you will ever need!
- bash version 5+
npm i -g scaffi
- Create your custom template like this one: https://github.com/wolfiesites/scaffi-example-template
- Store it either locally or in repo
- use the command below to download template and search replace placeholders:
scaffi --placeholder="value of the placeholder" --placetwo="second value" --template="/path/to/repo"
scaffi --directory="my awesome dir" --dirtwo="my amazing dir two" --filename="Scaffi is the best" --name="custom variable" -t="https://github.com/wolfiesites/scaffi-example-template"
scaffi --help
Package is new please consider making copy of your template before using template
IMPORTANT:
IT WORKS ON UNIX BASED (MAC / LINUX) SYSTEMS WITH BASH INSTALLED
IF YOU'RE on WINDOWS, Please consider using WSL
- Scaffi takes placeholders from template:
- #{{name}}
- #{{nameKC}}
- #{{nameSC}}
- #{{nameCC}}
- #{{namePC}}
- #{{nameSPACE}}
- #{{yourimaginaryplaceholder}}
- #{{yourimaginaryplaceholderKC}}
- #{{yourimaginaryplaceholderSC}}
- #{{yourimaginaryplaceholderCC}}
- #{{yourimaginaryplaceholderPC}}
- #{{yourimaginaryplaceholderSPACE}}
- defined values for those placholders in flags:
--name="awesome scaffi" --yourimaginaryplaceholder="imgainary is good" - takes and converts it to all the cases:
suffix | explanation | replacement |
---|---|---|
KC | KEBAB CASE | awesome-scaffi |
SC | SNAKE CASE | awesome_scaffi |
CC | CAMEL CASE | awesomeScaffi |
PC | PASCAL CASE | AwesomeScaffi |
SPACE | NORMAL STRING WITH SPACES | awesome scaffi |
- placeholders can be used as:
- directory
- filename
- variables in files
- conditional placeholders with block of code
- interactive mode
- feed placeholders with config file.json
- getting private repos with token auth
in ~/.basrhrc
add:
newblock() {
scaffi --same-value="$*" -t="/your/amazing/template"
}
* --same-value="" replaces all the placeholders with samevalue
and use a command in terminal:
newblock my amazing new block
your imagination is a key!