While attending the Nashville Software School, there was an optional challenge to build a command line application that would automatically pull down a GitHub repository. After finishing that, Emily Lemmon, the class' Junior Instructor, had the idea to turn it into an application that would help her and the TAs test student's repositories.
One can quickly clone down a new or old repository using pleaseSetupGit. This module will automatically setup README.md, setup .gitignore, add node_modules to git ignore, run npm init -y, run npm install, run grunt, and start the http server. You'll be up and ready to work in the span of one command! (Or two, because there's always one person who just has to have more than grunt and http server running.)
- npm install please-setup-git -g
- You're ready to repo stalk!
- Fork https://github.com/TimAConner/pleaseSetupGit to your profile
- Clone the repo down
- You're ready to contribute!
pleaseSetupGit <Repo URL> [--grunt --commit [--hs [--hs && --o]]]
- --grunt
- Will run grunt after npm install.
- Will remove watch statement from the Gruntfile.js if it is present.
- --hs
- Will start http server.
- If grunt is also being run, it will start it after grunt has run.
- --o
- Will automatically open a browser at the http server if after grunt and http server has been started.
- --commit
- Will commit if data has been changed after you npm init and install.
- Commit message is "Initial Commit"
When pleaseSetupGit runs, this is the order that it checks and executes what to do:
- Run git clone
- Create .gitignore if not present
- Add node_modules to .gitignore
- Create README.md if not present
- Add # repo-name to readme file.
- Run npm init -y if package or package-lock are not present
- Run npm install if node_modules is not present
- Run git commit if data has been added to the repo in the previous steps and if --commit option has been added as an option.
- Run grunt if --grunt command has been added as an option.
- When grunt is complete, it will run --hs if that has been added as an option.
- Run hs if --hs command has been added and grunt is complete.