Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes line width configurable when writing into theme's .info.yml file #37

Open
pm98zz-c opened this issue Sep 12, 2017 · 0 comments
Open

Comments

@pm98zz-c
Copy link
Contributor

When the theme is not "bundled" (or depending on your naming habits) within the patternlab base, you can end up with fairly long "paths" for the various twig templates.
This leads to "weird" results in the component-libraries section of the info file.

basics:
    paths:
      - ../../../../prototype/pattern-lab/source/_patterns/01-basics
      - >-
        ../../../../prototype/pattern-lab/source/_patterns/01-basics/00-breakpoints
      - ../../../../prototype/pattern-lab/source/_patterns/01-basics/01-colors
      - ../../../../prototype/pattern-lab/source/_patterns/01-basics/03-images
      - ../../../../prototype/pattern-lab/source/_patterns/01-basics/04-spacing
      - >-
        ../../../../prototype/pattern-lab/source/_patterns/01-basics/05-typography/fonts
      - >-
        ../../../../prototype/pattern-lab/source/_patterns/01-basics/05-typography/headings
      - >-
        ../../../

While the ">" is indeed normally valid, the way this is wrapped up (with extra "-") makes the parsing fail. I suspect this is due to the fact that js-yaml's dumper can't find a whitespace or character to split the line and ends up outputting it anyway.

An easy workaroung is to pass a longer line width as an option to the yaml.safeDump in addTwigNamespaceConfigToDrupal.

MR on its way.

illepic added a commit that referenced this issue Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant