2.0.1 • Published 2 years ago

scaffi v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Scaffi

The only scaffolding tool you will ever need!

Requirements:

  1. bash version 5+

How to install:

npm i -g scaffi

How to use:

  1. Create your custom template like this one: https://github.com/wolfiesites/scaffi-example-template
  2. Store it either locally or in repo
  3. use the command below to download template and search replace placeholders:
scaffi --placeholder="value of the placeholder" --placetwo="second value" --template="/path/to/repo"

Example:

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"

For further explanation use:

scaffi --help

Attention:

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

How it works:

  1. Scaffi takes placeholders from template:
  • #{{name}}
  • #{{nameKC}}
  • #{{nameSC}}
  • #{{nameCC}}
  • #{{namePC}}
  • #{{nameSPACE}}
  • #{{yourimaginaryplaceholder}}
  • #{{yourimaginaryplaceholderKC}}
  • #{{yourimaginaryplaceholderSC}}
  • #{{yourimaginaryplaceholderCC}}
  • #{{yourimaginaryplaceholderPC}}
  • #{{yourimaginaryplaceholderSPACE}}
  1. defined values for those placholders in flags: --name="awesome scaffi" --yourimaginaryplaceholder="imgainary is good"
  2. takes and converts it to all the cases:
suffixexplanationreplacement
KCKEBAB CASEawesome-scaffi
SCSNAKE CASEawesome_scaffi
CCCAMEL CASEawesomeScaffi
PCPASCAL CASEAwesomeScaffi
SPACENORMAL STRING WITH SPACESawesome scaffi
  1. placeholders can be used as:
  • directory
  • filename
  • variables in files

Future features:

  • conditional placeholders with block of code
  • interactive mode
  • feed placeholders with config file.json
  • getting private repos with token auth

Smart Usecases:

Please consider using .bashrc / .bashprofile to bend it to your will:

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!

2.0.1

2 years ago

2.0.0

2 years ago

1.0.5

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago