Created
October 14, 2012 02:22
-
-
Save paulfryzel/3887033 to your computer and use it in GitHub Desktop.
Empty node project alias
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
function genode() { | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: genode <project>" | |
else | |
proj=$1; file=${proj//-/_} | |
mkdir -p $proj/lib && touch $proj/lib/$file.js | |
echo -e "{\n \"name\": \"$proj\",\n \"version\": \"0.0.1\"\n}" > $proj/package.json | |
echo -e "module.exports = require('./lib/$file');" > $proj/index.js | |
echo $proj > $proj/README.md | |
fi | |
} | |
alias genode="genode" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment