Last active
September 2, 2020 17:13
-
-
Save puilp0502/42c716ba9e4fe9aa5e44ee9b15effe79 to your computer and use it in GitHub Desktop.
Initialize new react-ts-boilerplate template
This file contains 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
#!/bin/sh | |
REPO_URI="https://github.com/puilp0502/react-ts-boilerplate" | |
mkdir "$1" 2> /dev/null | |
VALID_DIRNAME=$? | |
if [ 0 -eq $VALID_DIRNAME ]; then | |
rmdir "$1" | |
else | |
echo "Invalid target directory: " "$1" | |
exit 1 | |
fi | |
# Clone Repo | |
git clone "$REPO_URI" "$1" | |
# Re-initialize git repo | |
cd "$1" && rm -rf .git && git init | |
# Install dependencies | |
npm install | |
echo "\nDone." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment