open-wc / custom-elements-manifest-deprecated

Custom Elements Manifest is a file format that describes custom elements in your project.
8 stars 4 forks source link

analyzer: Plugins are objects, not functions #62

Open jsantell opened 3 years ago

jsantell commented 3 years ago

via the README, Plugins are defined as functions, including the example:

A plugin is a function that returns an object. There are several hooks you can opt in to:

However, the current implementation defines a Plugin as an object with analyzePhase, and other callbacks. While plugins in npm (and the built in lit and stencil plugins) may expose functions, the plugins array must ultimately be an object.

Happy to send PR with doc changes, but want to confirm the intentions here first.