Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Installation

Everything else is automatic!

I recommend putting precommit-hook in your project's devDependencies to make sure that anyone who may be contributing to your project will have the hook installed.
I recommend putting prepush-hook in your project's devDependencies to make sure that anyone who may be contributing to your project will have the hook installed.

```
{
Expand All @@ -26,7 +26,7 @@ I recommend putting precommit-hook in your project's devDependencies to make sur
"test": "./other/command"
},
"devDependencies": {
"precommit-hook": "latest"
"prepush-hook": "latest"
}
}
```
Expand Down Expand Up @@ -56,7 +56,7 @@ OR
{
"name": "your_project",
"description": "just an example",
"precommit": ["test"]
"prepush": ["test"]
}
```

Expand Down Expand Up @@ -86,7 +86,7 @@ npm test

These scripts can be any shell executable commands, but must exit with a status code of 0 for success and 1 or greater for failure. The `PATH` environment variable used when executing these scripts will be similar to how npm configures it. That means if you `npm install jshint` locally to your project, you can put simply `"jshint ."` for your script rather than `"./node_modules/.bin/jshint ."`.

You may configure what scripts will be run by the hook, by passing an array of script names to the `"precommit"` key in your package.json.
You may configure what scripts will be run by the hook, by passing an array of script names to the `"prepush"` key in your package.json.

```javascript
{
Expand All @@ -97,7 +97,7 @@ You may configure what scripts will be run by the hook, by passing an array of s
"validate": "./command/to/run",
"test": "./other/command"
},
"precommit": ["lint", "test"]
"prepush": ["lint", "test"]
}
```

Expand Down