Kludge 🩹

kludge lets app developers make kludges to fix broken packages in a pinch. Basically Gleam’s patch-package.

Package Version Hex Docs

Installation

Add kludge as a dev dependency

gleam add kludge

You can try to make this dev only if you can get away with it.

⚠️Kludge requires git to function and apply patches.

Usage

How to make your first patches

# Edit a file in the gleep_glorp package
vim build/packages/gleep_glorp/src/gleep_glorp.gleam

# Tell kludge to save the changes that you made in gleep_glorp
gleam run -m kludge gleep_glorp

# Save and commit the changes you made to gleep_glorp in git
git add patches/gleep_glorp+1.16.0.patch
git commit

And then your friend can…

# Apply all the patches
gleam run -m kludge

Using a command runner like make or just with kludge is strongly recommended. Gleam does not have a post install scripts and using a command runner will hopefully prevent you from forgetting to apply patches.

Development

gleam run   # Run the project
gleam test  # Run the tests
Search Document