FsLab Journals 系统不太支持这一点,但您绝对可以找到一些方法来做到这一点。我能想到的一个简单选项是修改build.fsx
日志脚本,以便它重复处理脚本并使用,例如环境变量来指定输入文件。
如果您使用的是标准模板,请查看generateJournals 函数:
let generateJournals ctx =
let builtFiles = Journal.processJournals ctx
traceImportant "All journals updated."
Journal.getIndexJournal ctx builtFiles
我认为您应该能够按照以下方式对其进行修改:
let generateJournals ctx =
// Iterate over all inputs you want to process
for input in inputFiles do
// Set environment variable to keep 'input'
let builtFiles = Journal.processJournals ctx
// Move the resulting files, so that they do not
// get overwritten by the next run
// Just return the journal you want to open first below
traceImportant "All journals updated."
Journal.getIndexJournal ctx builtFiles
然后在日志中,您应该可以使用System.Environment
读取构建脚本中设置的变量。