Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #136 from jamesramsay/init-script
Browse files Browse the repository at this point in the history
Docs: init script (closes #132)
  • Loading branch information
James Ramsay committed Dec 31, 2015
2 parents 2371102 + 7523b71 commit e59b5ec
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
If you want to contribute to Hercule, please use a GitHub pull request.
This is the fastest way for features and fixes to be reviewed and merged it into the code base.

To do this, clone the repo and run:

```bash
./scripts/init
```

This will install the necessary dependencies and configure project git hooks.

## Getting started

The process of submitting a pull request is fairly straightforward and generally follows the same pattern each time:
Expand Down
26 changes: 26 additions & 0 deletions scripts/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Script to initialize repo
# - install required node packages
# - install git hooks


node=`which node 2>&1`
if [ $? -ne 0 ]; then
echo "Please install NodeJS."
echo "http://nodejs.org/"
exit 1
fi

npm=`which npm 2>&1`
if [ $? -ne 0 ]; then
echo "Please install NPM."
fi


echo "Installing required npm packages..."
npm install

echo "Installing git hooks..."
ln -sf commit-msg .git/hooks/commit-msg
ln -sf pre-commit .git/hooks/pre-commit

0 comments on commit e59b5ec

Please sign in to comment.