aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-02-29 17:37:23 +0000
committerHayleigh Thompson <me@hayleigh.dev>2024-02-29 17:37:59 +0000
commit23f7faeea4da5859e8f6a885f16036c0519d3208 (patch)
treed586b2c1aafd73e3cf143672a6d6d4f4f1ac14b4 /src
parent76aa81e35980f7e3dca45832ddeca5ba7c2395b3 (diff)
downloadlustre-23f7faeea4da5859e8f6a885f16036c0519d3208.tar.gz
lustre-23f7faeea4da5859e8f6a885f16036c0519d3208.zip
:memo: Better docs for 'main'.
Diffstat (limited to 'src')
-rw-r--r--src/lustre.gleam16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/lustre.gleam b/src/lustre.gleam
index b79488d..bb363ba 100644
--- a/src/lustre.gleam
+++ b/src/lustre.gleam
@@ -183,13 +183,24 @@ import lustre/internals/runtime
// MAIN ------------------------------------------------------------------------
/// This function exists so you can run helpful Lustre utilities from the command
-/// line using `gleam run -m lustre`. For a proper help message run:
+/// line using `gleam run -m lustre`. Here's a brief overview of the different
+/// subcommands you can run:
+///
+/// - `add` can be used to add useful binaries like `esbuild` to your project.
+///
+/// - `build` has additional subcommands for building Lustre applications or
+/// packaging Web Components.
+///
+/// - `dev` starts a development server that automatically loads your Lustre app.
+///
+/// For a proper help message run:
///
/// ```sh
/// gleam run -m lustre -- --help
/// ```
///
-/// 🚨 If you're just using Lustre as a library, *you can ignore this function*.
+/// **Note**: If you're just using Lustre as a library, *you can ignore this
+/// function*.
///
pub fn main() {
let args = argv.load().arguments
@@ -244,6 +255,7 @@ pub opaque type App(flags, model, msg) {
//
// Using `Option` here at least lets us say `None` for the empty case in the
// `application` constructor.
+ //
on_attribute_change: Option(Dict(String, Decoder(msg))),
)
}