Skip to content

Conversation

fananek
Copy link

@fananek fananek commented Apr 7, 2020

I would recommend to rename the package from LeafErrorMiddleware to leaf-error-middleware. First, it will match the repository URL which seems to be important for SPM and second it will match vapor 4 dependency naming convention.

As a result you can register it as all other vapor 4 packages.

// Example ... dependencies: [ // 💧 A server-side Swift web framework. .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0-rc"), .package(url: "https://github.com/vapor/leaf.git", from: "4.0.0-rc"), .package(url: "https://github.com/fananek/leaf-error-middleware.git", from: "2.0.0-beta") ], targets: [ .target(name: "App", dependencies: [ .product(name: "Leaf", package: "leaf"), .product(name: "LeafErrorMiddleware", package: "leaf-error-middleware"), .product(name: "Vapor", package: "vapor") ]), ... 
@0xTim
Copy link
Member

0xTim commented Apr 14, 2020

I'm going to leave it how it is. It makes more sense with how it is since the package only has a single product that matches the package name (though not the repo name). The README shows how to add the dependency line to specify the package name.

@0xTim 0xTim closed this Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants