Right now it's not clear how to bundle assets with a reprocessing app.
If I make a library that allows people to draw checkboxes for example, in my code I'll have something like let internalState = { checkboxCheckedAsset: Draw.loadImage(~src="assets/checkbox-checked.png", env).
The path to the asset is relative, so where should we be looking for it?
I think the simplest answer is that it should look relative to the project that the file belongs to. This is a bit tricky because there's no easy way to get access to the path of the current file or project. If we had a way to access build system internals during compilation, we could have the build system pass the path of the project being compiled. Then reprocessing could automatically handle turning the relative paths into absolute paths.
Right now it's not clear how to bundle assets with a reprocessing app.
If I make a library that allows people to draw checkboxes for example, in my code I'll have something like
let internalState = { checkboxCheckedAsset: Draw.loadImage(~src="assets/checkbox-checked.png", env).The path to the asset is relative, so where should we be looking for it?
I think the simplest answer is that it should look relative to the project that the file belongs to. This is a bit tricky because there's no easy way to get access to the path of the current file or project. If we had a way to access build system internals during compilation, we could have the build system pass the path of the project being compiled. Then reprocessing could automatically handle turning the relative paths into absolute paths.