Skip to content

Instantly share code, notes, and snippets.

@MoatazAbdAlmageed
Last active July 1, 2020 23:35
Show Gist options
  • Save MoatazAbdAlmageed/eddbdb53be2e9fbdcac180130af75c91 to your computer and use it in GitHub Desktop.
Save MoatazAbdAlmageed/eddbdb53be2e9fbdcac180130af75c91 to your computer and use it in GitHub Desktop.
mkapp(){
# Make app structure
# Usage
# - mkapp wuilt-api js
# - mkapp wuilt-api ts
app_name=${1:-app}
app_type=${2:-ts}
mkdir $app_name
cd $app_name
touch README.md .gitignore index.$app_type
npm init -y
mkdir src public libs utils
git init
echo node_modules > .gitignore
echo "console.log('Happy Hacking!');" > index.$app_type
echo "# $app_name" > README.md
echo "## Installation" >> README.md
echo '- `yarn ts-node index` ' >> README.md
# check if app typs is ts
yarn add -D typescript ts-node
git add .
git commit -m 'init'
code .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment