Skip to content

DanielleMaywood/cog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cog

Package Version Hex Docs

gleam add --dev cog@2

Introduction

Do you want to embed a file into your gleam source code? Well now you can!

Given some text file src/input.txt

hello, joe!

And a Gleam source file

//cog:embed src/input.txt
const input = ""

If you run the following command

gleam run -m cog

You'll find your Gleam source file has been updated to

//cog:embed src/input.txt
const input = "\u{68}\u{65}\u{6C}\u{6C}\u{6F}\u{2C}\u{20}\u{6A}\u{6F}\u{65}\u{21}"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages