@elastic/eui-docusaurus-theme 2.1.0 → 2.3.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 CHANGED
@@ -54,13 +54,13 @@ with `@elastic/eui-docusaurus-theme`:
54
54
 
55
55
  ```shell
56
56
  # npm
57
- npm install @elastic/eui-docusaurus-preset
57
+ npm install @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
58
58
 
59
59
  # pnpm
60
- pnpm add @elastic/eui-docusaurus-preset
60
+ pnpm add @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
61
61
 
62
62
  # Yarn
63
- yarn add @elastic/eui-docusaurus-preset
63
+ yarn add @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
64
64
  ```
65
65
 
66
66
  and in your `docusaurus.config.ts` file, add:
@@ -201,20 +201,19 @@ Run the following command to create a Docusaurus project:
201
201
  npx create-docusaurus@latest my-website classic --typescript
202
202
  ```
203
203
 
204
- Install `yalc` globally if you haven't already:
205
-
206
- ```shell
207
- npm install -g yalc
208
- ```
209
-
210
- In the root of the mono-repository, run the following commands to build and publish the preset locally:
204
+ In the root, run the following commands to build and pack the preset and theme locally:
211
205
 
212
206
  ```shell
207
+ # Build packages
208
+ yarn workspace @elastic/eui-docusaurus-theme build
213
209
  yarn workspace @elastic/eui-docusaurus-preset build
214
210
 
215
- # Publish the preset locally
216
- cd packages/docusaurus-preset
217
- yalc publish
211
+ # Pack packages
212
+ cd packages/docusaurus-theme
213
+ yarn pack --filename docusaurus-theme.tgz
214
+
215
+ cd ../docusaurus-preset
216
+ yarn pack --filename docusaurus-preset.tgz
218
217
  ```
219
218
 
220
219
  In your project, install EUI dependencies:
@@ -230,37 +229,26 @@ pnpm add @elastic/eui @elastic/charts @emotion/react @emotion/css moment
230
229
  yarn add @elastic/eui @elastic/charts @emotion/react @emotion/css moment
231
230
  ```
232
231
 
233
- and add the locally published packages:
232
+ and add the locally packed packages:
234
233
 
235
234
  ```shell
236
- yalc add @elastic/eui-docusaurus-preset
237
-
238
235
  # npm
239
- npm install
236
+ npm install /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
240
237
 
241
238
  # pnpm
242
- pnpm install
239
+ pnpm add /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
243
240
 
244
241
  # Yarn
245
- yarn
242
+ yarn add /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
246
243
  ```
247
244
 
248
245
  Configure Docusaurus to use the locally built preset as outlined in the [Usage section](#usage).
249
246
 
250
247
  #### Making changes
251
248
 
252
- When you make changes to the theme, rebuild and republish the packages:
249
+ When you make changes to the preset or theme, rebuild and repack the packages.
253
250
 
254
- ```shell
255
- # From the mono-repository root
256
- yarn workspace @elastic/eui-docusaurus-theme build
257
- yarn workspace @elastic/eui-docusaurus-preset build
258
-
259
- cd packages/docusaurus-preset
260
- yalc publish --push
261
- ```
262
-
263
- The `--push` flag automatically updates all projects using these packages.
251
+ Then reinstall the packages in your project to update the changes.
264
252
 
265
253
  Restart your Docusaurus development server:
266
254
 
@@ -275,18 +263,4 @@ pnpm start
275
263
  yarn start
276
264
  ```
277
265
 
278
- When you're done testing, remove the locally published packages from your project:
279
-
280
- ```shell
281
- # In your project
282
- yalc remove @elastic/eui-docusaurus-preset
283
-
284
- # npm
285
- npm install
286
266
 
287
- # pnpm
288
- pnpm install
289
-
290
- # Yarn
291
- yarn
292
- ```