Skip to content

Instantly share code, notes, and snippets.

@paulfryzel
Created October 14, 2012 02:22
Show Gist options
  • Save paulfryzel/3887033 to your computer and use it in GitHub Desktop.
Save paulfryzel/3887033 to your computer and use it in GitHub Desktop.
Empty node project alias
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