SwiftPackageIndex / SwiftPackageIndex-Server

The Swift Package Index is the place to find Swift packages!
https://swiftpackageindex.com
Apache License 2.0
538 stars 42 forks source link

Deal with non-library products better in "Use this Package" #3297

Closed daveverwer closed 1 week ago

daveverwer commented 3 weeks ago

As reported via Discord, “Use this Package” should provide the correct code when selecting a plugin product from the drop-down menu.

Screenshot 2024-08-16 at 09 49 44@2x

The code for this should be:

.plugin(name: "swift-openapi-generator", package: "swift-openapi-generator")

We might also want to filter out .executable products at the same time, as I don’t believe there’s anything useful we can do here. Or maybe we want to include them, but instead of code we could include some text saying how to use a command line tool.