feat: ✨ port artefact context to other functions
This commit is contained in:
parent
1878186c4f
commit
fe23382dcc
5 changed files with 29 additions and 28 deletions
|
@ -15,7 +15,9 @@ module Comfpile
|
|||
@recipes = []
|
||||
end
|
||||
|
||||
def craft(stage, target)
|
||||
def craft(stage, target, context)
|
||||
context = @core.sanitize_context context
|
||||
|
||||
@recipes.each do |recipe|
|
||||
match = target
|
||||
|
||||
|
@ -32,7 +34,7 @@ module Comfpile
|
|||
end
|
||||
end
|
||||
|
||||
new_artefact = Artefact.new(@core, self, stage, target)
|
||||
new_artefact = Artefact.new(@core, self, stage, target, context)
|
||||
|
||||
item = recipe[:block].call(match, new_artefact)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue