Skip to content

Update Pattern Lab To "Actually" Ignore Certain Files / Folders #20

Open
@sghoweri

Description

@sghoweri

Short version: Pattern Lab's Pattern Data reclusively looks through every single file and directory in the _patterns folder, independent on what file types / directory names are flagged to be ignored.

Currently these ignore settings are used to omit what gets copied over to the public folder when building however as I found out firsthand, these critically aren't ignored when the files get globbed.

...This causes Pattern Lab to become COMPLETELY unusable if say, you are independently versioning your components in a monorepo via Lerna, and Pattern Lab discovers all these yummy files in the nested node_modules folders. Yes, crappy workflows involving never-ending symlinks or file copying can work, but those solutions aren't sustainable when PL is hard-wired to want your patterns to live in one and only one place.

We have a working solution that involves using Symphony Finder to exclude the paths we want PL to ignore which seems to be doing the trick. With a little refactoring to configure this to use the YAML config, this should be PR ready: https://github.com/bolt-design-system/bolt/blob/feature/v0.3.0-alpha.4/.patches/ignoreCertainFolders.patch

CC @EvanLovely @evanmwillhite @jesconstantine @aleksip @bradfrost

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