Add plugin check when trying to install as theme component

AI-generated summary

The discussion proposes adding a check for plugin indicators like plugin.rb or package.json files when attempting to install something as a theme component. This is to prevent users from mistakenly trying to install plugins as themes, a common issue despite the existing “are you sure this is a theme” prompt.

pfaffman suggests using package.json as the best test, while acknowledging that some plugins may not have a plugin.rb file. The goal is to provide clearer guidance and instructions for installing plugins correctly instead of attempting to install them as themes.

This happens frequently and the “are you sure this is a theme” clearly isn’t a good enough prompt since people post here as if there is a problem with the code. Maybe that code should also look for a plugin.rb (or other indicator) and say that it’s a plugin with a link to plugin install instructions.

I think package.json seems like the best test, right? It’s possible to have a plugin that doesn’t have a plugin.rb file (in which case, the plugin should be re-written as a theme component, but that’s another problem).

4 Likes