Skip to content

Ignore files nested 2 levels deep #633

@georgiee

Description

@georgiee

Hello Team,
I put folders with assets in each of my pattern subtype folders. Those assets are js files, partials or whatever you want to put in there.

File structure is like this:

//works fine
pattern/subtype/pattern-file.mustache
pattern/subtype/pattern-file.js

//these will trigger the 2 level warning
pattern/subtype/sources
pattern/subtype/sources/some-file.js
pattern/subtype/sources/_some-pattern.mustache

But I get a warning for those nested folders:

"A pattern file [...] was found greater than 2 levels deep from [...]"
It's strongly suggested to not deviate from the following structure under _patterns/
While Pattern Lab may still function, assets may 404 and frontend links may break. Consider yourself warned.

The warning suggests that patternlab at least tries to process those files. I have concerns, that my files have side effects on the generating part of patternlab. You state yourself that it's strongly not suggested. So can we please just ignore files if too deep?

This would save us from that huge list of warnings and ensure that no file will ever take part in the pattern processing.

What do you think? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions