Ingest Files
Statically importing files as a Str
or a List U8
.
imports [ "some-file" as someStr : Str, "some-file" as someBytes : List U8, ]
Code
app "ingested-file" packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.0/bkGby8jb0tmZYsy2hg1E_B2QrCgcSTxdUlHtETwm5m4.tar.br" } imports [ pf.Stdout, "sample.txt" as sample : Str, ] provides [main] to pf main = Stdout.line "\(sample)"
Output
Run this from the directory that has main.roc
in it:
$ roc run main.roc The quick brown fox jumps over the lazy dog