CLItheme
theme check
Check a StoreOS theme the same way upload does.
Runs the same checks as upload and prints every problem. Errors (✗) stop an upload. Warnings (!) are likely mistakes that still render.
Usage
storeos theme check [dir]Output
> storeos theme check
✓ my-theme is valid (21 files)With problems:
> storeos theme check
! widgets/card.fluid: unknown {% schema %} key "lable" (did you mean "label"?)
✗ 1 error(s):
- config/document.json: uses widget "crad" but the theme has no widgets/crad.fluid (did you mean "card"?)Outside a theme folder:
> storeos theme check
✗ /Users/you/projects doesn't look like a theme (no layout/theme.fluid or config/document.json).
Create one with: storeos theme init my-themeExit code
It exits with code 1 when there are errors, so you can use it in CI. Warnings don't change the exit code.
bunx @storeos/cli theme checkWhat it checks
Errors:
layout/theme.fluidorconfig/document.jsonis missing- A folder or file type that isn't allowed
- A
.fluidfile that doesn't parse - A
{% schema %}with invalid JSON, a setting without akind, or an unknown kind config/document.jsonuses a widget the theme can't render- A Tailwind stylesheet doesn't compile
Warnings:
- A setting the markup never uses
- Settings guessed from the markup
- An unknown schema key or page name
- A
{% schema %}in a built-in widget, which is ignored - A built-in widget's markup that ignores the settings merchants change