Skip to content

Commit cb3ed01

Browse files
committed
Update and clean up docs
1 parent 53f56e5 commit cb3ed01

File tree

11 files changed

+6966
-6792
lines changed

11 files changed

+6966
-6792
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test-linux:
2323
--rm \
2424
-v "$(PWD):$(PWD)" \
2525
-w "$(PWD)" \
26-
swift:5.3 \
26+
swift:5.5 \
2727
bash -c 'make test-swift'
2828

2929
test-swift:
@@ -37,8 +37,6 @@ format:
3737
find . -type f -name '*.md' -print0 | xargs -0 perl -pi -e 's/ +$$//'
3838

3939
generate-variadics:
40-
swift run variadics-generator \
41-
--generate-path-zips \
42-
> Sources/URLRouting/Builders/Variadics.swift
40+
swift run variadics-generator > Sources/URLRouting/Builders/Variadics.swift
4341

4442
.PHONY: benchmarks format generate-variadics test

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# swift-url-routing
22

3-
A bidirectional router with more type safety and less fuss. This library is built with [Parsing][swift-parsing].
3+
A bidirectional URL router with more type safety and less fuss. This library is built with [Parsing][swift-parsing].
44

55
---
66

@@ -30,7 +30,7 @@ This library provides URL routing function for both client and server applicatio
3030

3131
To use the library you first begin with a domain modeling exercise. You model a route enum that represents each URL you want to recognize in your application, and each case of the enum holds the data you want to extract from the URL.
3232

33-
For example, if we had screens in our application that represent showing all books, showing a particular book, and searching books, we can model this as an enum:
33+
For example, if we had screens in our Books application that represent showing all books, showing a particular book, and searching books, we can model this as an enum:
3434

3535
```swift
3636
enum AppRoute {
@@ -69,7 +69,7 @@ let appRouter = OneOf {
6969
}
7070
```
7171

72-
This router describes at a high-level how to pick apart the path components, query parameters, and more from a URL in order to transform it into a `AppRoute`.
72+
This router describes at a high-level how to pick apart the path components, query parameters, and more from a URL in order to transform it into an `AppRoute`.
7373

7474
Once this router is defined you can use it to implement deep-linking logic in your application. You can implement a single function that accepts a `URL`, use the router's `match` method to transform it into an `AppRoute`, and then switch on the route to handle each deep link destination:
7575

@@ -92,7 +92,7 @@ This kind of routing is incredibly useful in client side iOS applications, but i
9292

9393
```swift
9494
appRoute.path(for: .searchBooks(query: "Blob Bio"))
95-
// /books/search?query=Blob%20Bio
95+
// "/books/search?query=Blob%20Bio"
9696
```
9797

9898
```swift
@@ -115,6 +115,8 @@ Node.ul(
115115
</ul>
116116
```
117117

118+
For [Vapor][vapor] bindings to URL Routing, see the [Vapor Routing][vapor-routing] package.
119+
118120
## Documentation
119121

120122
The documentation for releases and main are available here:
@@ -128,4 +130,5 @@ This library is released under the MIT license. See [LICENSE](LICENSE) for detai
128130

129131
[swift-url-routing-docs]: https://pointfreeco.github.io/swift-url-routing
130132
[swift-parsing]: http://github.com/pointfreeco/swift-parsing
133+
[vapor-routing]: http://github.com/pointfreeco/vapor-routing
131134
[vapor]: http://vapor.codes

0 commit comments

Comments
 (0)