Created
February 13, 2014 20:07
-
-
Save atlefren/8982824 to your computer and use it in GitHub Desktop.
initjs
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 | |
| #inits an empty git repo with an empty .gitignore, readme.md and src, lib and test folder | |
| #then it runs npm init | |
| if [ -n "$1" ]; then | |
| echo $1 | |
| if [ ! -d "$1" ]; then | |
| name=$1 | |
| git init $name | |
| cd $name | |
| touch .gitignore | |
| touch readme.md | |
| echo $name > readme.md | |
| mkdir lib | |
| mkdir src | |
| mkdir test | |
| npm init | |
| else | |
| echo "$1 exists" | |
| fi | |
| else | |
| echo "provide a name as first arg" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment