feat: begin the repo a bit late but better than never

This commit is contained in:
David Bailey 2023-04-03 22:36:01 +02:00
commit 607159334b
22 changed files with 898 additions and 0 deletions

View file

@ -0,0 +1,25 @@
module Comfpile
class FilesourceEngine < ArtefactEngine
def initialize(core, **options)
super(core, **options)
@root_path = options[:root_path]
end
def craft(stage, target)
return nil unless stage == :sourcefile
full_path = File.join(@root_path, target)
return nil unless File.exists? full_path
a = Artefact.new(@core, self, stage, target);
a[:file] = full_path
a[:filepath] = full_path
a
end
end
end