Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to prepare for release #14

Merged
merged 32 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c6fb555
Refactor to prepare for full release
robertdp Jul 20, 2022
f8454fc
Update CI
robertdp Jul 20, 2022
3d32e6d
Split up reexports
robertdp Jul 20, 2022
005f117
Expose routing DSL commands
robertdp Jul 20, 2022
a516321
Remove unnecessary braces
robertdp Jul 20, 2022
be98328
Update readme
robertdp Jul 20, 2022
aab911c
Export Driver' alias
robertdp Jul 20, 2022
8a1f9a6
Loosen internal exports
robertdp Jul 20, 2022
6d6af59
More explicit naming
robertdp Jul 20, 2022
aa7ee22
Change Driver to a type alias
robertdp Jul 20, 2022
70b35fb
Add back fiber tracking and killing
robertdp Jul 21, 2022
77f7ec1
Update to purs-tidy
robertdp Jul 21, 2022
bb5091d
Strip commends from Dhall files
robertdp Jul 21, 2022
c644c8e
Flesh out readme
robertdp Jul 21, 2022
606c49f
Add note about symmetry
robertdp Jul 21, 2022
ea06c35
Language
robertdp Jul 21, 2022
5bfd1b5
Update routes
robertdp Jul 21, 2022
a88f04c
Mention React
robertdp Jul 21, 2022
ea47f6f
Fix qualified example
robertdp Jul 21, 2022
249ba1a
Update var name
robertdp Jul 21, 2022
ac05db9
Update var name
robertdp Jul 21, 2022
663bef8
Language
robertdp Jul 21, 2022
1147522
Language
robertdp Jul 21, 2022
ede2647
Fix hidden code blocks
robertdp Jul 21, 2022
2efb416
Ix qualified exports
robertdp Jul 21, 2022
a4f6fdd
Switch to mkInterface pattern
robertdp Jul 21, 2022
54caf80
Fix example bug
robertdp Jul 21, 2022
767d3e3
More detailed nav example
robertdp Jul 21, 2022
27f858c
Fix naming
robertdp Jul 21, 2022
7f3c38f
Clearer language
robertdp Jul 21, 2022
632be04
Simplify the example structure
robertdp Jul 21, 2022
0729dbc
Update example
robertdp Jul 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3

- uses: thomashoneyman/setup-purescript@main
with:
purescript: "0.14.0"
spago: "0.19.1"
purescript: "0.15.4"
spago: "0.20.9"

- name: Cache PureScript dependencies
uses: actions/cache@v2
Expand Down
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
# purescript-web-router

A basic pushstate router for React with support for asynchronous routing logic, built using [react-basic-hooks](https://github.com/spicydonuts/purescript-react-basic-hooks). I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing.
A basic pushstate router for React with support for asynchronous routing logic. I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A basic pushstate router for React with support for asynchronous routing logic. I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing.
A basic pushstate router with support for asynchronous routing logic. I recommend [routing-duplex](https://github.com/natefaubion/purescript-routing-duplex) for easy parsing and printing.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme looks... a little different now 🙂

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README looks great :-)

Do you think that making a README part of a "test suite" (so we verify whether it still compiles) is feasible and desired?

I mean I use this strategy across my libs just by using something like:
https://github.com/paluh/purescript-homogeneous/blob/master/package.json#L10 (litps is really a tool written by @Thimoteus).

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If PS supported literate code I'd consider it, but I don't think it's worth the extra effort. The example project using React has also been updated and it compiles, so most of the code in the updated readme was tested there first.

Some unit tests would be good, but can come a bit later.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This litps provides support for "literate PS". Maybe I will play around that idea in my... spare time ;-)


For a basic example see [here](https://github.com/robertdp/purescript-web-router-example/tree/master/src).

## How to use with Spago

Add `web-router` to your `packages.dhall`:

```dhall
let additions =
{ web-router =
{ dependencies =
[ "aff"
, "effect"
, "freet"
, "indexed-monad"
, "prelude"
, "profunctor-lenses"
, "routing"
]
, repo = "https://github.com/robertdp/purescript-web-router.git"
, version = "v0.3.0"
}
}
```

And then install with
`$ spago install web-router`
Install with `$ spago install web-router` (coming soon)
Loading