Skip to content

Commit 32eee29

Browse files
committed
Swap to gleam
1 parent 1207131 commit 32eee29

10 files changed

+75
-94
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
/target
1+
*.beam
2+
*.ez
3+
/build
4+
erl_crash.dump
25
/input

Cargo.lock

-7
This file was deleted.

Cargo.toml

-6
This file was deleted.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# adventofcode2024
2+
3+
[![Package Version](https://img.shields.io/hexpm/v/adventofcode2024)](https://hex.pm/packages/adventofcode2024)
4+
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/adventofcode2024/)
5+
6+
```sh
7+
gleam add adventofcode2024@1
8+
```
9+
```gleam
10+
import adventofcode2024
11+
12+
pub fn main() {
13+
// TODO: An example of the project in use
14+
}
15+
```
16+
17+
Further documentation can be found at <https://hexdocs.pm/adventofcode2024>.
18+
19+
## Development
20+
21+
```sh
22+
gleam run # Run the project
23+
gleam test # Run the tests
24+
```

gleam.toml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name = "adventofcode2024"
2+
version = "1.0.0"
3+
4+
# Fill out these fields if you intend to generate HTML documentation or publish
5+
# your project to the Hex package manager.
6+
#
7+
# description = ""
8+
# licences = ["Apache-2.0"]
9+
# repository = { type = "github", user = "", repo = "" }
10+
# links = [{ title = "Website", href = "" }]
11+
#
12+
# For a full reference of all the available options, you can have a look at
13+
# https://gleam.run/writing-gleam/gleam-toml/.
14+
15+
[dependencies]
16+
gleam_stdlib = ">= 0.34.0 and < 2.0.0"
17+
18+
[dev-dependencies]
19+
gleeunit = ">= 1.0.0 and < 2.0.0"

manifest.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file was generated by Gleam
2+
# You typically do not need to edit this file
3+
4+
packages = [
5+
{ name = "gleam_stdlib", version = "0.51.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "14AFA8D3DDD7045203D422715DBB822D1725992A31DF35A08D97389014B74B68" },
6+
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
7+
]
8+
9+
[requirements]
10+
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
11+
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }

src/adventofcode2024.gleam

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import gleam/io
2+
3+
pub fn main() {
4+
io.println("Hello from adventofcode2024!")
5+
}

src/day1.rs

-54
This file was deleted.

src/main.rs

-26
This file was deleted.

test/adventofcode2024_test.gleam

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import gleeunit
2+
import gleeunit/should
3+
4+
pub fn main() {
5+
gleeunit.main()
6+
}
7+
8+
// gleeunit test functions end in `_test`
9+
pub fn hello_world_test() {
10+
1
11+
|> should.equal(1)
12+
}

0 commit comments

Comments
 (0)