Skip to content

Commit

Permalink
Move chokidar to peerDependencies and make it optional via peerDepend…
Browse files Browse the repository at this point in the history
…enciesMeta (#1329)

Fixes #1227. Closes #610
  • Loading branch information
rdmurphy authored Nov 25, 2020
1 parent f91f1c3 commit f51afa3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Unreleased
respect `throwOnUndefined` if sort attribute is undefined.
* Add `base` arg to
[`int` filter](https://mozilla.github.io/nunjucks/templating.html#int).
* Move `chokidar` to `peerDependencies` and mark it `optional` in `peerDependenciesMeta`.

3.2.2 (Jul 20 2020)
-------------------
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Nunjucks

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]
[![Test Codecov][codecov-image]][codecov-url]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]
[![Test Codecov][codecov-image]][codecov-url]

[Nunjucks](https://mozilla.github.io/nunjucks/) is a full featured
templating engine for javascript. It is heavily inspired by
Expand All @@ -15,6 +15,10 @@ templating engine for javascript. It is heavily inspired by

`npm install nunjucks`

To use the file watcher built-in to Nunjucks, Chokidar must be installed separately.

`npm install nunjucks chokidar`

(View the [CHANGELOG](https://github.com/mozilla/nunjucks/releases))

## Documentation
Expand Down
6 changes: 6 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ $ npm install nunjucks

Once installed, simply use `require('nunjucks')` to load it.

To use Nunjuck's built-in watch mode, Chokidar must be installed separately:

```
$ npm install nunjucks chokidar
```

Nunjucks supports all modern browsers and any version of Node.js
[currently supported by the Node.js Foundation](https://github.com/nodejs/Release#release-schedule1).
This includes the most recent version and all versions still in maintenance.
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^3.10.0"
},
"optionalDependencies": {
"peerDependencies": {
"chokidar": "^3.3.0"
},
"peerDependenciesMeta": {
"chokidar": {
"optional": true
}
},
"_moduleAliases": {
"babel-register": "@babel/register"
},
Expand Down

0 comments on commit f51afa3

Please sign in to comment.