Closed Liquidream closed 7 months ago
You should pass the main ink file as usual, and all other file via the json dictionnary (note that this is the same behaviour for the classic PosixHandler : you pass the main file and the PosixHandler look for the additional INCLUDEd files on disk)
Alternatively, you can pass "INCLUDE main.ink"
Thank you, @smwhr 🙌 As soom as I started reading your comment, I realised what I was missing/doing wrong. It's all working perfectly now, thank you ❤️
Hi there,
I'm trying to use the JSON File Handler to dynamically compile several linked ink scripts using Typescript, but I think I'm missing something on how to use the handler correctly.
The code I've got is something like this (simplified for illustration purposes)
The trouble is, I don't know what to pass as the first parameter to
Compiler()
(string that normally has the ink script), as now all the content is in the jsonFileHandler object.I've tried passing empty strings and null (as above), but it seems that just compiles an empty story and doesn't trigger the JSON file handler.
Any guidance given would be much appreciated, thanks! 🤓