We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This idea is inspired by pug4j's Helpers.
This feature would allow users to pass a new option, functions, with which they provide JS files that are imported into Pug files.
functions
npx pagery --data=info.json functions=fetcher.js
The Pug file would be able to access these as follows:
body h1= data.info.title p= functions.fetcher(data.info.welcomePageUrl)
The JS files would have to include an exports.default. The function title would be the filename. You may also pass an exported class or Object.
exports.default
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This idea is inspired by pug4j's Helpers.
This feature would allow users to pass a new option,
functions
, with which they provide JS files that are imported into Pug files.Example
The Pug file would be able to access these as follows:
The JS files would have to include an
exports.default
. The function title would be the filename. You may also pass an exported class or Object.The text was updated successfully, but these errors were encountered: