I'm using the programmatic API in a test helper method to compile a single template, so that I can create a JSDOM object and attach a script to it for testing. The programmatic method allows passing an options object that can have a quietMode property, and it's helpful to suppress all output in my test runner.
However, this option isn't respected by the eleventy-plugin-directory-output module so I get a lot of extraneous output from my test runner. I think the right way to fix this would be something like this:
- d.print();
+ if (!eleventyConfig.quietMode) d.print();
I thought I'd ask before submitting a PR if this is the best solution.
I'm using the programmatic API in a test helper method to compile a single template, so that I can create a JSDOM object and attach a script to it for testing. The programmatic method allows passing an
options
object that can have aquietMode
property, and it's helpful to suppress all output in my test runner.However, this option isn't respected by the
eleventy-plugin-directory-output
module so I get a lot of extraneous output from my test runner. I think the right way to fix this would be something like this:I thought I'd ask before submitting a PR if this is the best solution.