Skip to content

Instantly share code, notes, and snippets.

@rac3rx
Forked from sijpkes/new_node_project.sh
Last active June 12, 2020 22:36
Show Gist options
  • Save rac3rx/4ec8c158672fe1552499dc93e214b7a1 to your computer and use it in GitHub Desktop.
Save rac3rx/4ec8c158672fe1552499dc93e214b7a1 to your computer and use it in GitHub Desktop.
create new node project and github repo script
#!/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