Skip to content

Clearer error when run outside a project root #3

Description

@xBrokkr

stampui add <block> in a directory without package.json currently proceeds and writes files into cwd. Expected: a short error naming the problem ("no package.json found in ") and pointing to stampui doctor, with a --force escape hatch for intentional bare-directory use.

Good first issue: the check belongs at the top of the add/update actions; readPackageJson in src/lib.ts already returns {} for missing files, and has tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions