-
Notifications
You must be signed in to change notification settings - Fork 407
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
Patternlab should become a concrete class #572
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@geoffp PING |
In progress! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This was done as part of https://github.com/pattern-lab/patternlab-node/releases/tag/v3.0.0-alpha.5 |
I am using Pattern Lab Node
v2.7.0 (dev)
onLinux
, with Nodev4.6.2
, using theGrunt
Edition.Currently, the
Patternlab
"class" is just an object ({}
)which is extended here and there. Here a "convention over configuration" pattern is applied: Properties of the PL object are added as required.This approach has the following disadvantages:
Patternlab.createEmpty(additionalSettings)
To overcome these problems I propose
Pattern
class. This also would probably improve overall modularity of the application.The structure would be as follows:
PatternlabEngine
has aPatternlab
object with the fieldsengines
,package
,config
,events
,graph
(#540),patterns
,,
subtypePatterns,
data,
listitems,
patternSection,
patternSectionSubType,
header,
footer,
partials,
data.link(for completeness). Also it has at least a method to load+check the configuration from a JSON file. Probably major parts of
patternlab.js` could eventually be moved into there.Additionally it might be wise to apply a strategy pattern to how patterns are compiles (compile all, incremental, whatever).
Opinions?
The text was updated successfully, but these errors were encountered: