kentaroi / eleventy-plugin-clean

An Eleventy plugin to keep the output directory clean
MIT License
2 stars 2 forks source link

Broken on V2.0 canary #2

Closed AlexNodex closed 1 year ago

AlexNodex commented 1 year ago

The plugin is broken on 2.0 canary.

V2.0 adds optional options to the addPassthroughCopy function which in turn causes this plugin to fail with the following error (even when those options are not passed in)

[11ty] The value for a path property in addPassthroughCopy options should be true or of type String. (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: The value for a path property in addPassthroughCopy options should be true or of type String.
[11ty]     at PassthroughCopy.getOutputPaths (./11ty/node_modules/eleventy-plugin-clean/lib/passthrough-copy.js:59:15)
[11ty]     at async ./11ty/node_modules/eleventy-plugin-clean/lib/eleventy-clean.js:36:23
[11ty]     at async Promise.all (index 0)
[11ty]     at async updateFileRecordsFromPassthroughCopies (./11ty/node_modules/eleventy-plugin-clean/lib/eleventy-clean.js:32:3)
[11ty]     at async AsyncEventEmitter.<anonymous> (/./11ty/node_modules/eleventy-plugin-clean/lib/eleventy-clean.js:113:5)
[11ty]     at async Promise.all (index 2)
[11ty]     at async Eleventy.executeBuild (./11ty/node_modules/@11ty/eleventy/src/Eleventy.js:1093:7)
[11ty]     at async Eleventy.watch (./11ty/node_modules/@11ty/eleventy/src/Eleventy.js:924:18)
[11ty] Wrote 0 files in 0.02 seconds (v2.0.0-canary.12)
kentaroi commented 1 year ago

Thanks for filing the issue. I fixed it and released v1.2.0.