Skip to content

Assets location issue #115

Description

@bsansouci

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions