Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 45 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy site
on:
workflow_dispatch:
inputs:
environment:
description: Deploy to production or a preview URL
type: choice
options: [production, preview]
default: production

permissions:
contents: read

concurrency:
group: deploy-site
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 45
environment: vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: team_hpDr5Biqje4Idy2xKGjdDRsn
VERCEL_PROJECT_ID: prj_mZT9IE4DA026iIKAAinEH5rblXj6
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
workspaces: apps -> target
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: taiki-e/install-action@v2
with:
tool: just
- run: cargo install fusor-cli --version 0.1.4 --locked
- run: fusor install --manifest-path apps/Cargo.toml -p hypercmd-docs --locked
- run: npm install --global vercel@59.23.2
- run: vercel pull --yes --environment=${{ inputs.environment }}
- run: just deploy ${{ inputs.environment }}
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/target/
**/target/
node_modules/
tests/browser-consumer/dist/
dist/
.idea
.idea/
.idea/
.fusor/
.fusor-stage-*/
.vercel/
.env*
.DS_Store
test-results/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ On a fresh machine, run `just fetch` before the offline archive gate. Browser
component changes also require `just setup-browser` once and `just browser`.
See `docs/consumption.md` for the archive output.

The browser apps share a separate Cargo workspace under `apps/`, with the landing
page at `/` and the `docs-base` documentation app at `/docs/`. Run `just site` to
build both into `apps/dist/`, then `just preview` to serve them on port 4187.
`just preview 8080` selects another port. `FUSOR_BIN` can select a local Fusor
CLI. The individual `landing-dev` and `docs-dev` recipes serve one app.
See `apps/docs/README.md` for authoring.
`just check` includes both apps’ native checks; `just browser` includes their
browser suites and the combined-site navigation check.

The runtime and build helper consume fusor's supported public backend contracts.
Do not copy fusor's semantic lowering, reactive machinery or route matching.
Preserve token streams through `quote!`. An upstream gap needs a minimal
Expand All @@ -22,6 +31,29 @@ lifecycle/reentrancy, unbounded work, duplicated paths, speculative abstractions
misleading comments and tests that mirror implementation. Resolve blocking
findings before advancing.

## Deploying the site

The **Deploy site** workflow builds the landing page and docs with Rust, then
uploads prebuilt files to the Pirela team's `hypercmd` project on Vercel. Run it
from the Actions tab and choose production or preview. Pushes do not deploy.
Vercel's build machines do not provide the Rust toolchain this site needs.

For a local deployment, install the site prerequisites with
`cargo install fusor-cli --version 0.1.4 --locked` and
`fusor install --manifest-path apps/Cargo.toml -p hypercmd-docs --locked`.
Install Vercel CLI 59.23.2, then run `vercel login` and
`vercel link --yes --scope pirela --project hypercmd` once. Run
`vercel pull --yes --environment=production`, then `just deploy`.
For a preview, pull the preview environment and run `just deploy preview`.

`vercel.json` serves the docs under `/docs/`, including direct page links.
The deployment recipe removes Fusor build manifests, which contain local paths,
from the upload. Build output, `.vercel/` and local environment files are ignored.

The workflow reads `VERCEL_TOKEN` from the GitHub environment named `vercel`.
Use a token scoped to this Vercel project when replacing that secret. The team
and project IDs in the workflow are identifiers, not credentials.

## Releasing

Every crate shares one version: `version` under `[workspace.package]` in the
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["crates/hypercmd", "crates/hypercmd-build", "crates/hypercmd-cli", "examples/file-browser", "examples/job-inspector", "examples/job-controls"]
exclude = ["tests/consumer", "tests/browser-consumer"]
exclude = ["tests/consumer", "tests/browser-consumer", "apps"]
resolver = "2"

[workspace.package]
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ cd my-app
hypercmd run
```

`hypercmd new` writes the counter above and checks that it builds. Edit `ui/app.html` for the screen and `src/main.rs` for its state, then `hypercmd run` again. Run `hypercmd --help` for the other commands.
`hypercmd new` writes the counter above and checks that it builds. Edit
`ui/app.html` for the screen and `src/main.rs` for its state, then `hypercmd run`
again. See the [CLI reference](docs/cli.md) for commands and options.

### Author an application

Expand Down Expand Up @@ -140,9 +142,16 @@ To run the examples from a checkout, use [`just`](https://github.com/casey/just)

## Documentation

The Markdown guides also power a site through
[`docs-base`](https://github.com/fusor-rs/docs-base).
The [landing page](apps/landing/README.md) and docs share a browser workspace.
Run `just site`, then `just preview` to serve both on port 4187.
See [the site guide](apps/docs/README.md).

| Guide | Covers |
| --- | --- |
| [Terminal profile](docs/profile.md) | Supported HTML, CSS, layout, scrolling and Unicode policy |
| [CLI reference](docs/cli.md) | Installation, creating apps, checks, running and building |
| [HTML and CSS reference](docs/profile.md) | Supported HTML, CSS, layout, scrolling and Unicode policy |
| [Controls](docs/controls.md) | Keyboard, focus, buttons, text and checkbox bindings |
| [Async views](docs/async.md) | `Async`/`Await`, coherent publication and cancellation |
| [Routing](docs/routing.md) | Screens, nested views and in-memory history |
Expand Down
1 change: 1 addition & 0 deletions apps/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist/
Loading
Loading