diff --git a/CHANGELOG.md b/CHANGELOG.md index cb881c50..ad9fed8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) ------------------- diff --git a/README.md b/README.md index 2cd21e61..97194bac 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docs/getting-started.md b/docs/getting-started.md index a09b2da8..2e7088c9 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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. diff --git a/package.json b/package.json index 229ea5a8..8dc2253a 100644 --- a/package.json +++ b/package.json @@ -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" },