@servicetitan/docs-uikit 25.1.0 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/docs/startup.mdx +76 -33
  2. package/package.json +2 -2
package/docs/startup.mdx CHANGED
@@ -8,6 +8,24 @@ import { VersionHistory, Changes } from '@site/src/components/version-history';
8
8
  [@servicetitan/startup](https://github.com/servicetitan/uikit/tree/master/packages/startup) is a command-line interface (CLI) to create multi-package Lerna projects with the support of TypeScript Project References and React. It offers a modern build setup with no configuration.
9
9
 
10
10
  <VersionHistory>
11
+ <Changes forVersion="26.0.0">
12
+ <Admonition type="caution">
13
+ Upgraded <code>webpack-dev-server</code> from v3 to v5.
14
+ Version 5 introduces many breaking changes to the <code>webpack-dev-server</code> configuration.
15
+ For a complete list see the <a href="https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md">v4</a> and <a href="https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md">v5</a> migration guides.
16
+ Some common issues are:
17
+ <ul>
18
+ <li><strong>contentBase</strong> and <strong>watchContentBase</strong> were removed; use <strong>static</strong></li>
19
+ <li><strong>disableHostCheck</strong> was removed; use <code>allowedHosts: 'all'</code></li>
20
+ <li><strong>hotOnly</strong> was removed; use <code>hot: 'only'</code></li>
21
+ <li><strong>http2</strong> and <strong>https</strong> were removed; use <strong>server</strong></li>
22
+ <li><strong>injectClient</strong> and <strong>injectHot</strong> were removed in favor of manual setup entries</li>
23
+ <li><strong>inline</strong> was removed without replacement</li>
24
+ <li><strong>proxy</strong> only accepts an array</li>
25
+ <li><strong>publicPath</strong>, <strong>stats</strong> and <strong>writeToDisk</strong> were moved to <strong>devMiddleware</strong></li>
26
+ </ul>
27
+ </Admonition>
28
+ </Changes>
11
29
  <Changes forVersion="24.1.0">
12
30
  Changed <code>init</code> command to generate React 18 project by default
13
31
  and added <code>--react17</code> switch to generate React 17 project.
@@ -15,7 +33,7 @@ import { VersionHistory, Changes } from '@site/src/components/version-history';
15
33
  <Changes forVersion="24.0.0">
16
34
  <Admonition type="caution">
17
35
  <p>
18
- Upgraded <code>Typescript</code> from version v4 to v5.
36
+ Upgraded <code>Typescript</code> from v4 to v5.
19
37
  Version 5 adds correctness improvements that will reveal
20
38
  previously undetected ambiguities. In particular,
21
39
  </p>
@@ -308,17 +326,33 @@ import CheckIcon from '@servicetitan/anvil2/assets/icons/material/round/check.sv
308
326
 
309
327
  ## Configuration Customization
310
328
 
311
- The zero-configuration approach is a good fit for most use cases, but sometimes applications may need to extend or override configuration.
329
+ The zero-configuration approach is a good fit for most use cases, but sometimes applications need to extend or override configurations.
330
+ Use the `cli` node in `package.json` to customize `startup` behavior.
312
331
 
313
- ### Project Root
332
+ ### Project-wide settings
314
333
 
315
- #### `package.json` Configuration
334
+ Use the `cli` node in the root `package.json` to customize project-wide settings.
316
335
 
317
- Sometimes you may need to change the configuration of project-wide tools, e.g., extend the ESLint configuration. For these purposes, we support the `cli` node in the root `package.json` file with the following options:
336
+ #### Jest
337
+
338
+ Use `test` to set or override Jest options. E.g.,
339
+
340
+ ```json title="package.json"
341
+ {
342
+ "cli": {
343
+ "test": {
344
+ // Jest options (https://jestjs.io/docs/next/configuration)
345
+ }
346
+ }
347
+ }
348
+ ```
349
+
350
+ #### Linting
351
+
352
+ Use `lint` to set or override `ESLint` and `Stylelint` options. E.g,
318
353
 
319
354
  ```json title="package.json"
320
355
  {
321
- ...
322
356
  "cli": {
323
357
  "lint": {
324
358
  "eslint": {
@@ -327,85 +361,94 @@ Sometimes you may need to change the configuration of project-wide tools, e.g.,
327
361
  "stylelint": {
328
362
  // Stylelint options (https://stylelint.io/user-guide/configure)
329
363
  }
330
- },
331
- "test": {
332
- // Jest options (https://jestjs.io/docs/next/configuration)
333
364
  }
334
365
  }
335
- ...
336
366
  }
337
367
  ```
338
368
 
339
369
  #### NODE_OPTIONS
340
370
 
341
- To set or override Node options for startup commands, add **NODE_OPTIONS** to the `cli` node in the root `package.json`. Note, startup already runs all commands with `--max_old_space_size=8192` by default.
371
+ Use `NODE_OPTIONS` to set or override Node options for some or all commands. E.g.,
372
+
373
+ :::info
374
+ Note, `startup` runs all commands with `--max_old_space_size=8192` by default.
375
+ :::
342
376
 
343
377
  ```json title="package.json"
344
378
  {
345
- ...
346
379
  "cli": {
347
- // NODE_OPTIONS for all commands. E.g.,
348
- "NODE_OPTIONS": [
349
- "--max_old_space_size=4096"
350
- ],
380
+ "NODE_OPTIONS": ["--max_old_space_size=4096"], // NODE_OPTIONS for all commands
351
381
  "lint": {
352
- // NODE_OPTIONS for lint command only
382
+ "NODE_OPTIONS": [
383
+ /* NODE_OPTIONS for lint command */
384
+ ]
353
385
  },
354
386
  "test": {
355
- // NODE_OPTIONS for test command only
387
+ "NODE_OPTIONS": [
388
+ /* NODE_OPTIONS for test command */
389
+ ]
356
390
  }
357
391
  }
358
- ...
359
392
  }
360
393
  ```
361
394
 
362
- ### Package
363
-
364
- #### `package.json` Configuration
395
+ ### Package-specific settings
365
396
 
366
- [@servicetitan/startup](https://github.com/servicetitan/uikit/tree/master/packages/startup) supports different build behaviors for packages. You may change it through the `cli` node in the package's `package.json` file. By default, it applies the regular Webpack bundling.
397
+ To customize the settings for a specific package, use the `cli` node in its `package.jon`.
367
398
 
368
399
  ##### Non-application packages
369
400
 
370
- A project can contain supporting packages such as shared components, utilities, etc. It's recommended to disable the Webpack bundle for them.
401
+ Set `webpack` to `false` to disable Webpack bundling for non-application NPM packages, such as component and utility libraries. E.g.,
371
402
 
372
403
  ```json title="package.json"
373
404
  {
374
- ...
375
405
  "cli": {
376
406
  "webpack": false
377
407
  }
378
- ...
379
408
  }
380
409
  ```
381
410
 
382
- ##### Microfrontends
411
+ ##### Microfrontends (MFEs)
383
412
 
384
- You can find detailed information [here](/docs/frontend/micro-frontends).
413
+ Set `web-component` to `true` to create the support files and `light` and `full` bundles for MFE applications. E.g.,
385
414
 
386
415
  ```json title="package.json"
387
416
  {
388
- ...
389
417
  "cli": {
390
418
  "web-component": true
391
419
  }
392
- ...
393
420
  }
394
421
  ```
395
422
 
423
+ See [MFE configuration](/docs/frontend/micro-frontends/#mfe-configuration) for detailed instructions on configuring MFE applications.
424
+
396
425
  ##### Application Port
397
426
 
398
- Sometimes you may need to have a fixed port for the started application.
427
+ Use `port` to set the port that `webpack-dev-server` uses for the application. E.g.,
399
428
 
400
429
  ```json title="package.json"
401
430
  {
402
- ...
403
431
  "cli": {
404
432
  "webpack": {
405
433
  "port": 8888
406
434
  }
407
435
  }
408
- ...
436
+ }
437
+ ```
438
+
439
+ #### webpack-dev-server
440
+
441
+ Use `webpack.devServer` to set or override `webpack-dev-server` options. E.g.,
442
+
443
+ ```json title="package.json"
444
+ {
445
+ "cli": {
446
+ "webpack": {
447
+ "devServer": {
448
+ // webpack-dev-server options (https://webpack.js.org/configuration/dev-server/#devserver)
449
+ }
450
+ }
451
+ }
409
452
  }
410
453
  ```
411
454
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/docs-uikit",
3
- "version": "25.1.0",
3
+ "version": "26.0.1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "cli": {
17
17
  "webpack": false
18
18
  },
19
- "gitHead": "0274a11f080937b7433a5d09c901a2b8068c045d"
19
+ "gitHead": "3590356944af4147775bccfee592494c4464f60f"
20
20
  }