Add .js Pattern Lab Config Support
As @EvanLovely mentioned in https://github.com/pattern-lab/patternlab-node/pull/897#issuecomment-477833632,
we need the ability to allow PL config files to (also?) support .js config files instead of only allow .json files.
This would be super helpful!!
This pairs pretty exactly with: https://github.com/pattern-lab/patternlab-php-core/issues/116
As requested I'm copying in the features list here:
Some suggested settings:
- patternEngine - This configures the engine being used for the pattern library. Options would be overrides specific to each engine's
config.yml. - paths - This is an array configuring how Patterns are organized in the library. It should include support for shorthand (the default “atomic” as well as maybe some other common configurations) as well as an array hierarchy describing the directories and their relationships as in
patternlab-config.json. In addition, the root should be configurable in addition to "source" and "public" to allow running Pattern Lab from a sub-directory. - ordering - Configures whether Pattern Lab orders patterns by the default "filename", or by "header" or by "doc" where Pattern Lab would look in the pattern comments/documentation markdown file for
style guide: components.1-buttonetc. to organize the patterns.
Paths to resources should also be configurable to a "pattern" or "component" constant, where Pattern Lab looks in each component's directory for the relevant resource instead of a separate subdirectory. Many existing pattern libraries keep all relevant component files in the same subdirectory.
This issue is a part of a series to fold functionality present in the nearly identical tool PatternKit in an effort to coalesce the development communities and deprecate PatternKit in favor of Pattern Lab. We plan on moving forwards with development starting August 21st.
Related Reading:
- http://patternlab.io/docs/advanced-config-options.html
- https://github.com/drupal-pattern-lab/roadmap/issues/6#issuecomment-299923881
- http://ui-patterns.readthedocs.io/en/8.x-1.x/content/patterns-definition.html#override-patterns-behavior
- https://github.com/pattern-lab/patternlab-php-core/issues/63
- https://github.com/pattern-lab/patternlab-php-core/issues/57
- https://github.com/pattern-lab/patternlab-php-core/issues/48
- https://github.com/PatternBuilder
- https://github.com/pattern-lab/patternlab-php-core/issues/117
Made a ton of progress on this yesterday!
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks!
Shhh stale bot. Work is happening in #1000
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks!
Issue closed after going stale. It can be re-opened if still relevant.
Marking this as not stale since #1000 was updated just 11 days ago.