Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2023 12:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save danywalls/193e46e42751e209760f29c1d3215b51 to your computer and use it in GitHub Desktop.
example of scaffolding with bash
#validate that the user passed the parameter
if [ -z "$1" ]
echo "Please add the parameter to script ex: ./ blog"
#get the project name parameter
#set a list of directories to create
listOfDirectories="pages components store"
# use the angular cli to generate
npx -p @angular/cli ng new $projectName
cd $projectName
cd src
echo "Generate directories"
#create the list of directories
for directory in $listOfDirectories; do
mkdir $directory
# initialize git and commit the changes
git init
git add .
git commit -m "basic template"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment