Skip to content

Commit

Permalink
More instructions for use are added
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Oct 24, 2019
1 parent c42970c commit b4cd160
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,35 @@ $ pug-lint [options] <file ...>
* `-c, --config <path>`: [configuration file](#configuration-file) path
* `-r, --reporter <reporter>`: error reporter; console - default, inline

#### Lint multiples files in npm script

First install [glob-exec](https://www.npmjs.com/package/glob-exec)

```shell
npm i -D glob-exec
```

```json
{
"scripts": {
"lint:pug": "glob-exec \"./src/**/*.pug\" -- \"pug-lint {{files.join(' ')}}\""
}
}
```

#### Integrate with [lint-staged](https://www.npmjs.com/package/lint-staged)

```json
{
"lint-staged": {
"{src}/**/*.pug": [
"pug-lint",
"git add"
]
}
}
```

## Editor integration

### Sublime Text 3
Expand Down

0 comments on commit b4cd160

Please sign in to comment.