| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -307,17 +307,20 @@ Introduced in Pattern Lab Node v3, UIKits are a new term in the Pattern Lab [Eco | |||
| 307 | 307 | `uikits` accepts an array of UIKit objects, shipping with the one above. | |
| 308 | 308 | ||
| 309 | 309 | - `name`: the name of the UIKit | |
| 310 | + - `package`: the NodeJS package name. This property was introduced in version 5.13 to allow for a uikit package to be used multiple times with different names. Add the package as a dependency in `package.json` before you configure it here. | ||
| 310 | 311 | - `outputDir` where to output this UIKit relative to the current root. By leaving this empty we retain the existing Pattern Lab 2.X behavior, outputting to `<project_root>/public`. If you had multiple UIKits, however, you would provide different values, such as: | |
| 311 | 312 | ||
| 312 | 313 | ```javascript | |
| 313 | 314 | "uikits": [ | |
| 314 | 315 | { | |
| 315 | 316 | "name": "uikit-workshop", | |
| 317 | + "package": "@pattern-lab/uikit-workshop", | ||
| 316 | 318 | "outputDir": "workshop", | |
| 317 | 319 | ... | |
| 318 | 320 | }, | |
| 319 | 321 | { | |
| 320 | 322 | "name": "uikit-storefront", | |
| 323 | + "package": "@pattern-lab/uikit-storefront", | ||
| 321 | 324 | "outputDir": "storefront", | |
| 322 | 325 | ... | |
| 323 | 326 | } | |
@@ -333,13 +336,19 @@ Important details: | |||
| 333 | 336 | - the [default `paths.source` object paths](https://github.com/pattern-lab/patternlab-node/pull/840/commits/a4961bd5d696a05fb516cdd951163b0f918d5e19) within `patternlab-config.json` are now relative to the current UIKit. See the [structure of uikit-workshop](https://github.com/pattern-lab/patternlab-node/tree/master/packages/uikit-workshop) for more info | |
| 334 | 337 | - the [default `paths.public` object paths](https://github.com/pattern-lab/patternlab-node/pull/840/commits/812bab3659f504043e8b61b1dc1cdac71f248449) 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. | |
| 335 | 338 | - `dependencyGraph.json` has moved to the project root rather than `public/` as we should only retain one | |
| 339 | + - The lookup of the uikit by `name` is deprecated and the user will be notified of it. If the `package` property isn't defined, there is a default fallback lookup strategy where the value of `name` is tried as: | ||
| 340 | + - `<name>` | ||
| 341 | + - `uikit-<name>` | ||
| 342 | + - `@pattern-lab/<name>` | ||
| 343 | + - `@pattern-lab/uikit-<name>` | ||
| 336 | 344 | ||
| 337 | 345 | **default**: | |
| 338 | 346 | ||
| 339 | 347 | ```javascript | |
| 340 | 348 | "uikits": [ | |
| 341 | 349 | { | |
| 342 | 350 | "name": "uikit-workshop", | |
| 351 | + "package": "@pattern-lab/uikit-workshop", | ||
| 343 | 352 | "outputDir": "", | |
| 344 | 353 | "enabled": true, | |
| 345 | 354 | "excludedPatternStates": [], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments