Skip to content

Commit 573d1a5

Browse files
committed
Update the readme on modifying the nunjucks environment.
1 parent 7c5a197 commit 573d1a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/engine-nunjucks/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Level of Support is more or less full. Partial calls and lineage hunting are sup
1717

1818
## Extending the Nunjucks instance
1919

20-
To add custom filters or make customizations to the nunjucks instance, create a file named `patternlab-nunjucks-config.js` in the root of your Pattern Lab project. `patternlab-nunjucks-config.js` should export a function that takes two parameters. The first parameter is the nunjucks instance; the second is the nunjucks instance's environment.
20+
To add custom filters or make customizations to the nunjucks instance, create a file named `patternlab-nunjucks-config.js` in the root of your Pattern Lab project. `patternlab-nunjucks-config.js` should export a function with the Nunjucks environment as parameter.
2121

2222
```
23-
module.exports = function (nunjucks, env) {
23+
module.exports = function (env) {
2424
[YOUR CUSTOM CODE HERE]
2525
};
2626
```
@@ -30,7 +30,7 @@ Example: `patternlab-nunjucks-config.js` file that uses lodash and adds three cu
3030
var _shuffle = require('lodash/shuffle'),
3131
_take = require('lodash/take');
3232
33-
exports = module.exports = function (nunjucks, env) {
33+
exports = module.exports = function (env) {
3434
env.addFilter('shorten', function (str, count) {
3535
return str.slice(0, count || 5);
3636
});

0 commit comments

Comments
 (0)