-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin validator should support nunjucks functions #2375
Plugin validator should support nunjucks functions #2375
Conversation
ee00aee
to
20728dd
Compare
20728dd
to
e79b56f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, seems to run the checkPathExists()
validation still
Would be great to maintain a JSDoc definition so we don't lose track of fields like this again in future? There's one I made already over in 39a3b41 which can help catch issues too
Otherwise the schema comment in plugins.js is very out of date:
govuk-prototype-kit/lib/plugins/plugins.js
Lines 14 to 30 in 1fc78df
* A schema for an example manifest file follows: | |
* | |
* // govuk-prototype-kit.config.json | |
* { | |
* "assets": path | path[], | |
* "importNunjucksMacrosInto": path | path[], | |
* "nunjucksPaths": path | path[], | |
* "nunjucksFilters": path | path[], | |
* "sass": path | path[], | |
* "scripts": path | path[], | |
* "stylesheets": path | path[], | |
* "templates": { | |
* "name": string, | |
* "path": path, | |
* "type": string | |
* }[] | |
* } |
Thank you for spotting this. I'll update this in a separate PR |
The plugins validator should allow nunjucks functions to be included by validating the prototype config key nunjucksFunctions