-
-
Save rac3rx/4ec8c158672fe1552499dc93e214b7a1 to your computer and use it in GitHub Desktop.
create new node project and github repo script
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
#!/bin/sh | |
# @Author: ps158 | |
# @Date: 2017-04-24T13:08:28+10:00 | |
# @Last modified by: ps158 | |
# @Last modified time: 2017-04-24T13:41:13+10:00 | |
# REF: https://www.wolfe.id.au/2014/02/01/getting-a-new-node-project-started-with-npm/ | |
mkdir $1 | |
cd $1 | |
git init | |
wget https://gist.github.com/wolfeidau/8748317/raw/172a6adb79777676a8815da5719ef659fb66a35b/Makefile | |
wget https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore -O .gitignore | |
make skel | |
# git stuff if you want it | |
read -p "Would you like to make a repo for this project on github?" -n 1 -r | |
echo | |
if [[ ! $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "No worries, enjoy." | |
#[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 | |
else | |
echo "Creating your git repo..." | |
hub create | |
git add . | |
git commit -a 'Initial release' | |
fi | |
npm init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment