Description
At the moment, the source files for the server are in the master
branch, but the source files for the frontend are in the gh-pages
branch (along with the compiled output which is actually used by GH Pages). This has a few drawbacks:
- It's more awkward to clone the repo and get the client side and server side working together locally than it potentially could be if all code were in one branch; you need to have two separate git checkouts, for instance
- It's harder to keep track of which versions of the client are supposed to work with which versions of the server (if all the code were in one branch, it would be safe to assume that the server and client at any given commit are supposed to work together, or we could at least aim for that)
- We have to check in a ton of compiled JS code alongside the sources for the frontend, which makes PRs difficult to review
- It ties merges to deployments in a way that can be awkward -- for example, if a change to the client has passed review and could be merged but can't be deployed yet, say, because the server needs to be deployed first. Right now I would like to merge Frontend updates for 0.12 #127, but it would break Try PureScript unless we deployed the server at the same time.
I think the last one is the most significant, as I think the way this repo is set up currently is more or less incompatible with the approach we were describing at https://discourse.purescript.org/t/looking-for-new-maintainers-for-purescript-org/1014/25 where we want to be able to automate deployment as much as possible.
If we put the frontend source in master
alongside the server, I think local development and deployment for Try PureScript could be made a bit simpler: we could have all of the source files for both frontend and backend live in the same branch, and have scripts for local development which compile and run of the app for you. We could then have a separate script which generates the compiled frontend files ready for serving and checks those in on the gh-pages
branch, so that the gh-pages
branch would only be used for compiled build artifacts and not source code. (Or alternatively we could just stop using GH pages entirely; the CDN probably isn't giving us all that much benefit since the frontend only needs to be loaded once, more or less. But that's something we can consider separately)