@elastic/eui-docusaurus-theme 2.0.0 → 2.2.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 +18 -44
- package/lib/.tsbuildinfo-client +1 -1
- package/lib/components/demo/actions_bar/actions_bar.d.ts +3 -2
- package/lib/components/demo/actions_bar/actions_bar.js +2 -2
- package/lib/components/demo/code_transformer.js +1 -1
- package/lib/components/demo/codesandbox/open_action.js +7 -4
- package/lib/components/demo/demo.d.ts +30 -4
- package/lib/components/demo/demo.js +2 -2
- package/lib/theme/Demo/actions.d.ts +2 -1
- package/lib/theme/DocBreadcrumbs/Items/Home/index.js +4 -1
- package/lib/theme/DocCard/index.d.ts +5 -0
- package/lib/theme/DocCard/index.js +44 -0
- package/package.json +3 -3
- package/src/components/demo/actions_bar/actions_bar.tsx +8 -2
- package/src/components/demo/code_transformer.ts +1 -1
- package/src/components/demo/codesandbox/open_action.tsx +8 -5
- package/src/components/demo/demo.tsx +32 -3
- package/src/theme/Demo/actions.tsx +2 -1
- package/src/theme/DocBreadcrumbs/Items/Home/index.tsx +4 -1
- package/src/theme/DocCard/index.tsx +104 -0
- package/src/theme/theme.d.ts +5 -1
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
|
-
|
|
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
|
-
#
|
|
216
|
-
cd packages/docusaurus-
|
|
217
|
-
|
|
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
|
|
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
|
|
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
|
|
249
|
+
When you make changes to the preset or theme, rebuild and repack the packages.
|
|
253
250
|
|
|
254
|
-
|
|
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
|
-
```
|