Last active
December 24, 2017 23:31
-
-
Save kheob/52d467d09dd1fa64ef9306fca8a83593 to your computer and use it in GitHub Desktop.
Generates a Node TypeScript 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
echo "Node project name: " | |
read project_name | |
if [ -d "$project_name" ]; then | |
echo "Project already exists." | |
elif [ -z "$project_name" ]; then | |
echo "You didn't enter a name." | |
else | |
git clone --depth=1 https://github.com/Microsoft/TypeScript-Node-Starter.git $project_name | |
cd $project_name | |
npm install | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
echo '' | |
echo ${GREEN}Start MongoDB:${NC} mongod | |
echo ${GREEN}Build the project:${NC} npm run build | |
echo ${GREEN}Run the project:${NC} npm start | |
echo ${GREEN}Watch the project:${NC} npm run watch | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment