← Recipe: package an image and compose visuals

2. Replace luastra.json

luastra/assets · UI.Image · UI.Shape · about 15 minutes
admit image/luastra-mark

The asset entry binds a stable typed ID to one project-relative file and its exact media type.

When to use it

Replace the generated manifest after the image file exists; check fails closed when the path, type, or asset kind is inconsistent.

Focused example

{
  "schemaVersion": 2,
  "project": { "id": "dev.luastra.visuals-recipe", "entry": "app/main" },
  "sdk": { "contract": 1 },
  "capabilities": ["ui.render"],
  "assets": [
    {
      "id": "image/luastra-mark",
      "source": "assets/luastra-mark.png",
      "mediaType": "image/png"
    }
  ],
  "modules": [
    {
      "id": "app/main",
      "source": "src/main.luau",
      "dependencies": ["luastra/app", "luastra/assets", "luastra/ui"]
    },
    {
      "id": "app/tests/visuals",
      "source": "tests/smoke.luau",
      "dependencies": ["app/main", "luastra/assets"]
    }
  ],
  "tests": ["app/tests/visuals"]
}

Complete inventory

View all pages in Recipe: package an image and compose visuals
← Previous: 1. Create the projectNext: 3. Replace src/main.luau →