@servicetitan/docs-uikit 22.14.0 → 22.16.0
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.
- package/README.md +20 -7
- package/docs/lazy-module.mdx +1 -1
- package/docs/startup.mdx +26 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ To preview changes use the local `docusaurus` project. See the `docusaurus` READ
|
|
|
10
10
|
|
|
11
11
|
Use `yalc` to preview changes within the entire ServiceTitan Engineering documentation.
|
|
12
12
|
|
|
13
|
+
### Initial setup
|
|
14
|
+
|
|
13
15
|
1. Install the `yalc` package globally
|
|
14
16
|
|
|
15
17
|
```sh
|
|
@@ -23,21 +25,21 @@ $ cd <path-to-uikit>
|
|
|
23
25
|
$ npm run build
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
3. Run `yalc publish` in the `docs`
|
|
28
|
+
3. Run `yalc publish` in the `packages/docs` folder to publish the package documentation locally
|
|
27
29
|
|
|
28
30
|
```sh
|
|
29
|
-
$ cd
|
|
31
|
+
$ cd ./packages/docs
|
|
30
32
|
$ yalc publish
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
4. Run `yalc add @servicetitan/docs-uikit` in the servicetitan
|
|
35
|
+
4. Run `yalc add @servicetitan/docs-uikit` in the `servicetitan/docs` repo to use the locally published documents
|
|
34
36
|
|
|
35
37
|
```sh
|
|
36
|
-
$ cd <path-to-servicetitan
|
|
38
|
+
$ cd <path-to-servicetitan/docs>
|
|
37
39
|
$ yalc add @servicetitan/docs-uikit
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
5. Update dependencies
|
|
42
|
+
5. Update dependencies
|
|
41
43
|
|
|
42
44
|
```sh
|
|
43
45
|
$ npm i
|
|
@@ -51,9 +53,20 @@ $ npm start
|
|
|
51
53
|
|
|
52
54
|
This opens the documentation in a browser window.
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
### Live updates
|
|
57
|
+
|
|
58
|
+
To see further changes without having to restart the server,
|
|
59
|
+
|
|
60
|
+
1. Run `yalc push` in the uikit `packages/docs` folder to push changes to `servicetitan/docs`
|
|
55
61
|
|
|
56
62
|
```sh
|
|
57
|
-
|
|
63
|
+
# > uikit/packages/docs
|
|
58
64
|
$ yalc push
|
|
59
65
|
```
|
|
66
|
+
|
|
67
|
+
2. Run `npm run prebuild` (or `npm run import-package-docs`) in `servicetitan/docs`
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
# > servicetitan/docs
|
|
71
|
+
$ npm run prebuild
|
|
72
|
+
```
|
package/docs/lazy-module.mdx
CHANGED
|
@@ -32,7 +32,7 @@ export const DispatchModule: React.FC = () => <LazyDispatch />;
|
|
|
32
32
|
|
|
33
33
|
### lazyModule
|
|
34
34
|
|
|
35
|
-
`lazyModule` accepts module loader function and returns React component that retrieves module from a remote host during the first render. Additionally `lazyModule` creates an [error boundary](
|
|
35
|
+
`lazyModule` accepts module loader function and returns React component that retrieves module from a remote host during the first render. Additionally `lazyModule` creates an [error boundary](./error-boundary) around your module to catch and log runtime errors.
|
|
36
36
|
|
|
37
37
|
#### Options
|
|
38
38
|
|
package/docs/startup.mdx
CHANGED
|
@@ -6,6 +6,9 @@ import Admonition from '@theme/Admonition';
|
|
|
6
6
|
import { VersionHistory, Changes } from '@site/src/components/version-history';
|
|
7
7
|
|
|
8
8
|
<VersionHistory>
|
|
9
|
+
<Changes forVersion="v22.15.0">
|
|
10
|
+
Runs all commands with 8GB of memory by default.
|
|
11
|
+
</Changes>
|
|
9
12
|
<Changes forVersion="v22.11.0">
|
|
10
13
|
Added <code>install</code> command that replaces legacy bootstrap.js
|
|
11
14
|
and changed <code>init</code> template to use it.
|
|
@@ -229,6 +232,29 @@ Sometimes you may need to change the configuration of project-wide tools, e.g.,
|
|
|
229
232
|
}
|
|
230
233
|
```
|
|
231
234
|
|
|
235
|
+
#### NODE_OPTIONS
|
|
236
|
+
|
|
237
|
+
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.
|
|
238
|
+
|
|
239
|
+
```json title="package.json"
|
|
240
|
+
{
|
|
241
|
+
...
|
|
242
|
+
"cli": {
|
|
243
|
+
// NODE_OPTIONS for all commands. E.g.,
|
|
244
|
+
"NODE_OPTIONS": [
|
|
245
|
+
"--max_old_space_size=4096"
|
|
246
|
+
],
|
|
247
|
+
"lint": {
|
|
248
|
+
// NODE_OPTIONS for lint command only
|
|
249
|
+
},
|
|
250
|
+
"test": {
|
|
251
|
+
// NODE_OPTIONS for test command only
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
...
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
232
258
|
### Package
|
|
233
259
|
|
|
234
260
|
#### `package.json` Configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/docs-uikit",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.16.0",
|
|
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": "
|
|
19
|
+
"gitHead": "79adb1a1ec5d89601541349b01201a16bc2e2db9"
|
|
20
20
|
}
|