Last active
July 1, 2020 23:35
-
-
Save MoatazAbdAlmageed/eddbdb53be2e9fbdcac180130af75c91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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