diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-03-22 01:42:26 +0000 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-03-22 01:42:26 +0000 |
commit | e85bc4729a15d9af5af5345151178afe849036ba (patch) | |
tree | cc229a534fff73b6cd0c1ea4b290a12cedb7aa08 /src/lustre.gleam | |
parent | e9b765a757b610ea970f80e7c0092bf4899acfa6 (diff) | |
download | lustre-e85bc4729a15d9af5af5345151178afe849036ba.tar.gz lustre-e85bc4729a15d9af5af5345151178afe849036ba.zip |
:truck: Move cli code to lustre-labs/dev-tools.
Diffstat (limited to 'src/lustre.gleam')
-rw-r--r-- | src/lustre.gleam | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/lustre.gleam b/src/lustre.gleam index 40b8059..ff4fcdd 100644 --- a/src/lustre.gleam +++ b/src/lustre.gleam @@ -163,7 +163,6 @@ // IMPORTS --------------------------------------------------------------------- -import argv import gleam/bool import gleam/dict.{type Dict} import gleam/dynamic.{type Decoder} @@ -171,52 +170,11 @@ import gleam/erlang/process.{type Subject} import gleam/option.{type Option, None, Some} import gleam/otp/actor.{type StartError} import gleam/result -import glint -import lustre/cli/add -import lustre/cli/build -import lustre/cli/dev import lustre/effect.{type Effect} import lustre/element.{type Element} import lustre/internals/patch import lustre/internals/runtime -// MAIN ------------------------------------------------------------------------ - -/// This function exists so you can run helpful Lustre utilities from the command -/// 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 -/// ``` -/// -/// **Note**: If you're just using Lustre as a library, *you can ignore this -/// function*. -/// -pub fn main() { - let args = argv.load().arguments - - glint.new() - |> glint.as_gleam_module - |> glint.with_name("lustre") - |> glint.with_pretty_help(glint.default_pretty_help()) - |> glint.add(at: ["add", "esbuild"], do: add.esbuild()) - |> glint.add(at: ["add", "tailwind"], do: add.tailwind()) - |> glint.add(at: ["build", "app"], do: build.app()) - |> glint.add(at: ["build", "component"], do: build.component()) - |> glint.add(at: ["dev"], do: dev.run()) - |> glint.run(args) -} - // TYPES ----------------------------------------------------------------------- /// Represents a constructed Lustre application that is ready to be started. |