You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/engine-nunjucks/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,10 @@ Level of Support is more or less full. Partial calls and lineage hunting are sup
17
17
18
18
## Extending the Nunjucks instance
19
19
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.
21
21
22
22
```
23
-
module.exports = function (nunjucks, env) {
23
+
module.exports = function (env) {
24
24
[YOUR CUSTOM CODE HERE]
25
25
};
26
26
```
@@ -30,7 +30,7 @@ Example: `patternlab-nunjucks-config.js` file that uses lodash and adds three cu
30
30
var _shuffle = require('lodash/shuffle'),
31
31
_take = require('lodash/take');
32
32
33
-
exports = module.exports = function (nunjucks, env) {
0 commit comments