pattern-lab / starterkit-mustache-acidtest

Cross-platform acid tests for Pattern Lab
MIT License
2 stars 2 forks source link

Numbers in pattern names and ~json variants #6

Open Martin-B opened 6 years ago

Martin-B commented 6 years ago

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,

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

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!