tangled
alpha
login
or
join now
foxgirl.engineering
/
gleam2nix
3
fork
atom
tools for building gleam projects with nix
3
fork
atom
overview
issues
pulls
pipelines
gleam2nix/appspec: rename from gen-app
foxgirl.engineering
5 months ago
9f365ca4
fef74d6b
verified
This commit was signed with the committer's
known signature
.
foxgirl.engineering
SSH Key Fingerprint:
SHA256:zgspAKSFKA6vB30vPBY6QSa/osCDgrr8YASW+mNz13M=
+3
-3
1 changed file
expand all
collapse all
unified
split
src
main.rs
+3
-3
src/main.rs
···
16
16
17
17
#[derive(Debug)]
18
18
enum Command {
19
19
+
Appspec,
19
20
Entrypoint,
20
21
GenNix,
21
21
-
GenApp,
22
22
NotFound,
23
23
}
24
24
25
25
impl From<&str> for Command {
26
26
fn from(value: &str) -> Self {
27
27
match value {
28
28
+
"appspec" => Command::Appspec,
28
29
"gen-nix" => Command::GenNix,
29
29
-
"gen-app" => Command::GenApp,
30
30
"entrypoint" => Command::Entrypoint,
31
31
_ => Command::NotFound,
32
32
}
···
67
67
let args: Arguments = facet_args::from_std_args()?;
68
68
69
69
match (&(*args.command)).into() {
70
70
+
Command::Appspec => app::generate_app_file(args),
70
71
Command::Entrypoint => entrypoint::generate_module(
71
72
args.rest
72
73
.first()
73
74
.ok_or(miette!("No module name specified"))?,
74
75
),
75
76
Command::GenNix => gen_nix(args),
76
76
-
Command::GenApp => app::generate_app_file(args),
77
77
Command::NotFound => Err(miette!("Command not found")),
78
78
}
79
79
}