noelforte / eleventy-plugin-vento

Eleventy plugin that adds support for Vento templates
https://www.npmjs.com/package/eleventy-plugin-vento
MIT License
6 stars 0 forks source link

Explore aligning `plugins` and `filters` API #5

Closed noelforte closed 4 months ago

noelforte commented 4 months ago

Currently, plugins are used like this:

{
  plugins: [
    pluginA({ ...pluginAOptions }),
    pluginB({ ...pluginBOptions }),
    // ...
  ]
}

And filters are used like this:

{
  filters: {
    filterA(content) { /* ...filter code... */ },
    filterB(content) { /* ...filter code... */ },
    // ...
  }
}

Wondering if it makes more sense to align the API's for plugins and filters by either making them both arrays or objects, so the implementations are similar.