Last active
July 25, 2018 04:16
-
-
Save mattak/f95a8f4c8750ee61aea79ec09d87f659 to your computer and use it in GitHub Desktop.
Create empty umm project
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 | |
set -ue | |
if [ ! -e $HOME/.umm-config.json ]; then | |
cat <<__CHECK__ | |
ERROR: Cannot find umm-config.json | |
Make sure the file exists on $HOME/.umm-config.json | |
__CHECK__ | |
exit 0 | |
fi | |
read -p "Scope (ex: umm): " SCOPE | |
read -p "ModuleName (ex: cafu_xxx): " MODULE_NAME | |
read -p "Description: " DESCRIPTION | |
read -p "GitHub Orgs (default: $SCOPE): " ORGANIZATIONS | |
read -p "GitHub Repository (default: $MODULE_NAME): " REPOSITORY | |
if [ -z "$ORGANIZATIONS" ]; then | |
ORGANIZATIONS=$SCOPE | |
fi | |
if [ -z "$REPOSITORY" ]; then | |
REPOSITORY=$MODULE_NAME | |
fi | |
git clone [email protected]:umm/_template_module.git $MODULE_NAME | |
cd $MODULE_NAME | |
rm -Rf .git/ | |
git init | |
git remote add origin [email protected]:$ORGANIZATIONS/$REPOSITORY.git | |
yarn | |
npm run umm:init "@$SCOPE/$MODULE_NAME" "$DESCRIPTION" | |
cat <<__INSTRUCTION__ | |
🚀 What's next? | |
cd $MODULE_NAME | |
# edit README.md | |
# edit package.json | |
git add . | |
git commit -m ":hatching_chick: Initialized" | |
git push origin master | |
Enjoy your development 🌟 | |
__INSTRUCTION__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
素敵っぽい ! ✨
自分のも修正しました!