Skip to Content
StoreOSv0.27.1
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

terminal
> storeos theme check
✓ my-theme is valid (21 files)

With problems:

terminal
> 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:

terminal
> 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-theme

Exit 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 check

What it checks

Errors:

  • layout/theme.fluid or config/document.json is missing
  • A folder or file type that isn't allowed
  • A .fluid file that doesn't parse
  • A {% schema %} with invalid JSON, a setting without a kind, or an unknown kind
  • config/document.json uses 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

On this page