Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KitchenScript

KitchenScript is an Elixir DSL for managing recipes.

Features

  • Recipe dependencies
  • Per-ingredient minimum quantities
  • Recipe scaling
  • Total ingredient summation
  • Minimum recipe scale
  • Substitutes

Example

defmodule MyRecipe do
  use KitchenScript

  recipe "bar ingredient" do
    servings(2)
    makes({2, :cup})

    ingredients do
      source(ingredient(:baz, "baz", {1, :cup}))
    end

    steps do
      step("Whisk it")
    end
  end

  recipe "creme brulee" do
    servings(4)
    makes({1, :cup})

    ingredients do
      source(ingredient(:eggs, "eggs", {2, :each}))
      source(ingredient(:eggs_2, "eggs", {3, :each}))
      source(ingredient(:milk, "milk", {1, :cup}))
      make(ingredient(:foo, "bar ingredient", {1, :cup}))
    end

    steps do
      step("""
      Heat <%= @eggs %>
      """)
    end
  end

  make(1, "creme brulee")

  print_kitchen(:latex)
end

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages