Skip to content

Commit

Permalink
Revert to previous wording for npm script example
Browse files Browse the repository at this point in the history
  • Loading branch information
timoxley committed Sep 14, 2016
1 parent 19b58bf commit 0b2270e
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ in JavaScript Standard Style, or check out some of

- [Install](#install)
- [Usage](#usage)
- [Runnning standard with npm test](#runnning-standard-with-npm-test)
- [What you might do if you're clever](#what-you-might-do-if-youre-clever)
- [Badge](#badge)
- [Text editor plugins](#text-editor-plugins)
- [FAQ](#faq)
Expand Down Expand Up @@ -132,29 +132,31 @@ $ standard "src/util/**/*.js" "test/**/*.js"
**Note:** by default `standard` will look for all files matching the patterns:
`**/*.js`, `**/*.jsx`.

### Runnning standard with npm test
### What you might do if you're clever

Below is a simple example of running standard before running tests:
1. Add it to `package.json`

```json
{
"name": "my-cool-package",
"devDependencies": {
"standard": "*"
},
"scripts": {
"test": "standard && node my-tests.js"
```json
{
"name": "my-cool-package",
"devDependencies": {
"standard": "*"
},
"scripts": {
"test": "standard && node my-tests.js"
}
}
}
```
```

Style will now be checked automatically when you run `npm test`. Never give style feedback on a pull request again!
2. Check style automatically when you run `npm test`

```
$ npm test
```
$ npm test
Error: Use JavaScript Standard Style
lib/torrent.js:950:11: Expected '===' and instead saw '=='.
```
lib/torrent.js:950:11: Expected '===' and instead saw '=='.
```

3. Never give style feedback on a pull request again!



Expand Down

0 comments on commit 0b2270e

Please sign in to comment.