Emitis a special type of flow that allows you to output more than just one file from an executed blueprint.
emitflow is as follows:
filepath. Filepath tells the emitter where to write the content you provide. The emitter writes
content- which can be any content generated using any flow, substitution, or even plain text - into the file defined using
true, a file will be emitted. The file will be written into
/[export directory]/Readme.mdand the content will be everything defined inside emit body:
filepathargument. Because the
filepathcan contain any path, it can not only be hardcoded as in the previous example, but also constructed dynamically. Let's look at the next example:
writeToFilePath. This file path will differ based on the component name. Then, we emitted the content defined within
emitbody into that file. The resulting file will look like this:
injectflow, which allows you to inject the content of a blueprint into another one.