Skip to content

Commit f87e2bc

Browse files
authored
Documenting the package tag on uikits config entries (#1249)
1 parent 5b20396 commit f87e2bc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/docs/src/docs/advanced-config-options.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,20 @@ Introduced in Pattern Lab Node v3, UIKits are a new term in the Pattern Lab [Eco
307307
`uikits` accepts an array of UIKit objects, shipping with the one above.
308308

309309
- `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.
310311
- `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:
311312

312313
```javascript
313314
"uikits": [
314315
{
315316
"name": "uikit-workshop",
317+
"package": "@pattern-lab/uikit-workshop",
316318
"outputDir": "workshop",
317319
...
318320
},
319321
{
320322
"name": "uikit-storefront",
323+
"package": "@pattern-lab/uikit-storefront",
321324
"outputDir": "storefront",
322325
...
323326
}
@@ -333,13 +336,19 @@ Important details:
333336
- 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
334337
- 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.
335338
- `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>`
336344

337345
**default**:
338346

339347
```javascript
340348
"uikits": [
341349
{
342350
"name": "uikit-workshop",
351+
"package": "@pattern-lab/uikit-workshop",
343352
"outputDir": "",
344353
"enabled": true,
345354
"excludedPatternStates": [],

0 commit comments

Comments
 (0)