Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Numbers in pattern names and ~json variants #6

Open
Martin-B opened this issue Dec 19, 2017 · 0 comments
Open

Numbers in pattern names and ~json variants #6

Martin-B opened this issue Dec 19, 2017 · 0 comments

Comments

@Martin-B
Copy link

Martin-B commented Dec 19, 2017

Hello again, Brian,

We have found, when migrating our style guide from the node distro to the php distro that the following occurs :

Case - 1 -- pseudo patterns with numbers

A .json variant pseudo pattern starting with a number will fail in the php version, for example,

  • file.mustache
  • file.md
  • file.json
  • file.two-columns.json
  • file~2columns.json

Both 2 column variants will be created in the public directory. The parser @ Rule.php may shout a warning in some cases over the variant starting with number immediately following the tilde symbol. The Patternlab menu will not be updated, the file~2columns.json variant will not be foud in the patternlab menus, despite being properly compiled in /public/_patterns.

The partials discovery mechanism is broken when importing a file containing decimal numbers

  • This works : {{> 00-atoms/10-images/image-768-ratio-1.77-01 }}
  • This does not work : {{> atoms-image-1200-ratio-1.5-01 }}, from source filename image-1200-ratio-1.5-01.mustache
  • And will not work either if we add starting digits to the imported atom so as to name it as such : {{> atoms-image-1200-ratio-1.5-01 }}, from source filename 04-image-1200-ratio-1.5-01.mustache

Note the similitude in between the nomenclature for the two files with distinct names.They follow the exact same pattern.

My understanding it that it would be a healthy time saver to document the fact that it is not a good idea to use decimal in the mustache filename. Make it a use case in the example of that which will not work.

http://patternlab.io/docs/pattern-including.html

Thank you for your help, happy holidays!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant