aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-03-24 22:08:16 +0000
committerHayleigh Thompson <me@hayleigh.dev>2024-03-24 22:08:16 +0000
commit644ad2001936b6064b424a6ca4d30f2c6269cf43 (patch)
tree9f991bf1eafc88e9f5f147a0b18761ef4047b6b6 /pages
parentfcd43b637a132c39e8dff537b0d4c28206ddd076 (diff)
downloadlustre-644ad2001936b6064b424a6ca4d30f2c6269cf43.tar.gz
lustre-644ad2001936b6064b424a6ca4d30f2c6269cf43.zip
:memo: Fix links.
Diffstat (limited to 'pages')
-rw-r--r--pages/guide/01-quickstart.md26
-rw-r--r--pages/guide/02-state-management.md2
2 files changed, 17 insertions, 11 deletions
diff --git a/pages/guide/01-quickstart.md b/pages/guide/01-quickstart.md
index 9b0cf94..4ada2d5 100644
--- a/pages/guide/01-quickstart.md
+++ b/pages/guide/01-quickstart.md
@@ -36,13 +36,9 @@ runtime. Some of Lustre's core features include:
To get started, let's create a new Gleam application and add Lustre as a dependency.
```sh
-$ gleam new app && cd app && gleam add lustre
+gleam new app && cd app && gleam add lustre
```
-> **Note**: this guide is written for Lustre v4. The latest stable release of
-> Lustre is v3. To follow along with this guide, you need to _manually_ edit your
-> `gleam.toml` and change the required version of lustre to `"4.0.0-rc.2"`.
-
By default, Gleam builds projects for the Erlang target unless told otherwise. We
can change this by adding a `target` field to the `gleam.toml` file generated in
the root of the project.
@@ -71,11 +67,21 @@ pub fn main() {
}
```
-Lustre includes tooling like a server to serve your application in development.
-You can start that server by running:
+Lustre has some official development tooling published in the
+[`lustre_dev_tools`](https://hexdocs.pm/lustre_dev_tools/) package. Most projects
+will probably want to add those too!
+
+```sh
+gleam add --dev lustre_dev_tools
+```
+
+It's important to make sure the development tooling is added as a `--dev`
+dependency. This ensures they're never included in production builds of your app.
+
+To start a development server, we can run:
```sh
-$ gleam run -m lustre dev
+gleam run -m lustre/dev start
```
The first time you run this command might take a little while, but subsequent runs
@@ -373,11 +379,11 @@ how you like to learn:
if the Lustre repository that gradually introduce more complex applications
and ideas.
-- The [rest of this guide](./02-state-management) also continues to teach
+- The [rest of this guide](./02-state-management.html) also continues to teach
Lustre's high-level concepts and best-practices.
- If you're coming from LiveView or have heard about Lustre's server components
- and want to learn more, you can skip to the [server components](./05-server-components)
+ and want to learn more, you can skip to the [server components](./05-server-components.html)
section of the guide to learn about how to run Lustre applications on the backend.
- Of course, if you want to dive in and start making things straight away, the
diff --git a/pages/guide/02-state-management.md b/pages/guide/02-state-management.md
index a5d1bf5..de06163 100644
--- a/pages/guide/02-state-management.md
+++ b/pages/guide/02-state-management.md
@@ -59,7 +59,7 @@ to get used to, but it brings a number of benefits:
history of state updates and can be serialised and logged for debugging or
testing purposes.
-- State updates are **pure**. We will learn more about this in the [next guide](./03-side-effects),
+- State updates are **pure**. We will learn more about this in the [next guide](./03-side-effects.html),
but for now it is enough to know that this means testing your state changes is
much easier because mocking messages is simpler than mocking side effects!