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

Feature/uikit refactor #840

merged 49 commits into from Apr 27, 2018


None yet
3 participants

bmuenzenmeyer commented Apr 13, 2018

Closes #811

Summary of changes:

UIKits are a new term in the Pattern Lab Ecosystem, attempting to evolve beyond the current Styleguidekit pattern which separated front-end templates from front-end assets like stylesheets and code. The existing styleguidekit-assets-default and styleguidekit-mustache-default have merged into uikit-workshop (more on that name in a bit). The hope is that by co-locating all front-end files in a single repository, users will be more capable of altering existing UIKits, making their own, even building multiple UIs from a single source of truth.

You heard that right - Pattern Lab 3.X will support multiple UI outputs from a single set of source patterns - implementing what @bradfrost coined the workshop and the storefront. True to form, the default Pattern Lab experience is therefore the workshop.

patternlab-config.json has a new key:

+  "uikits": [
+    {
+      "name": "uikit-workshop",
+      "outputDir": "",
+      "enabled": true,
+      "excludedPatternStates": ["inreview"],
+      "excludedTags": []
+    }
+  ]

uikits accepts and array of UIKit objects, shipping with the one above.

  • name: the name of the UIKit
  • outputDir where to output this UIKit relative to the current root. by leaving this empty we retain the existing behavior, outputting to <project_rooter>/public. If you had multiple UIKits, however, you would provided different values, such as:
"uikits": [
    "name": "uikit-workshop",
    "outputDir": "workshop",
    "name": "uikit-storefront",
    "outputDir": "storefront",

check the output:


  • enabled: quickly turn on or off the building of this UIKit
  • excludedPatternStates: tell Pattern Lab not to include patterns with these states in this UIKit's output
  • excludedPatternTags: tell Pattern Lab not to include patterns with these tags in this UIKit's output
    • currently not supported

Other notes that coincide with this work:

  • the default paths.source object paths within patternlab-config.json are now relative to the current UIKit. See the structure of uikit-workshop for more info
  • the default paths.public object paths within patternlab-config.json are now relative to the current UIKit's outputDir. Absolute paths will no longer work. Someone could test putting an absolute path in a UIKit outputDir property and see what happens I suppose.
  • dependencyGraph.json has moved to the project root rather than public/ as we should only retain one

To aide in users building their own UIKits, I've also created uikit-bare outside this monorepo, as a thing to fork and change to your needs. The uikit-bare wiki attempts to document the API Pattern Lab expects from a UIKit and what data it provides a UIKit during build.

Known Issues

  • UIKit excluded tag support
  • UIKit lineage still links to excluded patterns

Feedback Needed

This is a work in progress, so please provide feedback along the way.

bmuenzenmeyer added some commits Mar 23, 2018

feat(uikits): support incremental builds
this might still be a WIP, as changes do not always get reflected. either a bug here or in live-server?

@bmuenzenmeyer bmuenzenmeyer changed the base branch from master to dev Apr 13, 2018


This comment has been minimized.

coveralls commented Apr 16, 2018

Coverage Status

Coverage increased (+5.8%) to 69.394% when pulling 87c9d0d on feature/uikit-refactor into 170a11d on dev.

bmuenzenmeyer added some commits Apr 17, 2018

feat(API): standardize v() and version() into a single call
BREAKING CHANGE: change `version()` to return a string representation of the version, removing `v()`

This comment has been minimized.


bradfrost commented Apr 24, 2018

Just stopping in to say hello, as this looks fun and interesting!

@bmuenzenmeyer bmuenzenmeyer merged commit d6ba41c into dev Apr 27, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+5.8%) to 69.394%
security/snyk No new issues

@bmuenzenmeyer bmuenzenmeyer deleted the feature/uikit-refactor branch Apr 27, 2018

@bmuenzenmeyer bmuenzenmeyer referenced this pull request May 25, 2018


UI Priorities #92

3 of 8 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment