First factory¶
Start by generating a factory source directory:
The generated directory contains:
factory.ub, the factory source file.project.ub, the dependency project file.
Edit factory.ub into a small file-writing factory:
factory: {
description: 'Writes a greeting file.'
inputs: {
message: { type: string, description: 'Text to write' }
path: { type: string, description: 'File path to write' }
}
imports: { std: 'github.com/cloudboss/unobin-library-std' }
resources: {
greeting: std.fs-file {
path: input.path
content: input.message
}
}
outputs: {
path: { value: resource.greeting.path }
size: { value: resource.greeting.size }
}
}
Add the imported library to the dependency project and write the lock:
You can now compile the factory.