@elastic/eui-docusaurus-preset 1.0.0 → 1.1.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
@@ -31,17 +31,17 @@ The preset comes with themes and plugins configured.
31
31
 
32
32
  The EUI preset uses the [preset constructor](https://docusaurus.io/docs/using-plugins#creating-presets) to define the theme (`@elastic/eui-docusaurus-theme`) and plugins.
33
33
 
34
- To use it in your Docusaurus project, install the package:
34
+ To use it in your Docusaurus project, install the preset and the theme:
35
35
 
36
36
  ```shell
37
37
  # npm
38
- npm install @elastic/eui-docusaurus-preset
38
+ npm install @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
39
39
 
40
40
  # pnpm
41
- pnpm add @elastic/eui-docusaurus-preset
41
+ pnpm add @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
42
42
 
43
43
  # Yarn
44
- yarn add @elastic/eui-docusaurus-preset
44
+ yarn add @elastic/eui-docusaurus-preset @elastic/eui-docusaurus-theme
45
45
  ```
46
46
 
47
47
  and in your `docusaurus.config.ts` file, add:
@@ -126,20 +126,19 @@ Run the following command to create a Docusaurus project:
126
126
  npx create-docusaurus@latest my-website classic --typescript
127
127
  ```
128
128
 
129
- Install `yalc` globally if you haven't already:
130
-
131
- ```shell
132
- npm install -g yalc
133
- ```
134
-
135
- In the root of the mono-repository, run the following commands to build and publish the preset locally:
129
+ In the root, run the following commands to build and pack the preset and theme locally:
136
130
 
137
131
  ```shell
132
+ # Build packages
133
+ yarn workspace @elastic/eui-docusaurus-theme build
138
134
  yarn workspace @elastic/eui-docusaurus-preset build
139
135
 
140
- # Publish the preset locally
141
- cd packages/docusaurus-preset
142
- yalc publish
136
+ # Pack packages
137
+ cd packages/docusaurus-theme
138
+ yarn pack --filename docusaurus-theme.tgz
139
+
140
+ cd ../docusaurus-preset
141
+ yarn pack --filename docusaurus-preset.tgz
143
142
  ```
144
143
 
145
144
  In your project, install EUI dependencies:
@@ -155,36 +154,26 @@ pnpm add @elastic/eui @elastic/charts @emotion/react @emotion/css moment
155
154
  yarn add @elastic/eui @elastic/charts @emotion/react @emotion/css moment
156
155
  ```
157
156
 
158
- and add the locally published packages:
157
+ and add the locally packed packages:
159
158
 
160
159
  ```shell
161
- yalc add @elastic/eui-docusaurus-preset
162
-
163
160
  # npm
164
- npm install
161
+ npm install /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
165
162
 
166
163
  # pnpm
167
- pnpm install
164
+ pnpm add /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
168
165
 
169
166
  # Yarn
170
- yarn
167
+ yarn add /path/to/eui/packages/docusaurus-preset/docusaurus-preset.tgz /path/to/eui/packages/docusaurus-theme/docusaurus-theme.tgz
171
168
  ```
172
169
 
173
170
  Configure Docusaurus to use the locally built preset as outlined in the [Usage section](#usage).
174
171
 
175
172
  #### Making changes
176
173
 
177
- When you make changes to the preset, rebuild and republish the packages:
178
-
179
- ```shell
180
- # From the mono-repository root
181
- yarn workspace @elastic/eui-docusaurus-preset build
182
-
183
- cd packages/docusaurus-preset
184
- yalc publish --push
185
- ```
174
+ When you make changes to the preset or theme, rebuild and repack the packages.
186
175
 
187
- The `--push` flag automatically updates all projects using these packages.
176
+ Then reinstall the packages in your project to update the changes.
188
177
 
189
178
  Restart your Docusaurus development server:
190
179
 
@@ -198,19 +187,3 @@ pnpm start
198
187
  # Yarn
199
188
  yarn start
200
189
  ```
201
-
202
- When you're done testing, remove the locally published packages from your project:
203
-
204
- ```shell
205
- # In your project
206
- yalc remove @elastic/eui-docusaurus-preset
207
-
208
- # npm
209
- npm install
210
-
211
- # pnpm
212
- pnpm install
213
-
214
- # Yarn
215
- yarn
216
- ```
@@ -0,0 +1,4 @@
1
+ ## [`v1.1.0`](https://github.com/elastic/eui/releases/v1.1.0)
2
+
3
+ - Moved `@elastic/eui-docusaurus-theme` from `dependencies` to `peerDependencies`. Consumers must install both `@elastic/eui-docusaurus-preset` and `@elastic/eui-docusaurus-theme` in their projects. ([#9248](https://github.com/elastic/eui/pull/9248))
4
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elastic/eui-docusaurus-preset",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "EUI preset for Docusaurus",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib/index.js",
@@ -14,14 +14,13 @@
14
14
  "url": "https://github.com/elastic/eui.git",
15
15
  "directory": "packages/docusaurus-preset"
16
16
  },
17
- "dependencies": {
18
- "@elastic/eui-docusaurus-theme": "^2.0.0"
19
- },
20
17
  "devDependencies": {
21
18
  "@docusaurus/types": "^3.7.0",
19
+ "@elastic/eui-docusaurus-theme": "^2.1.0",
22
20
  "typescript": "~5.5.4"
23
21
  },
24
22
  "peerDependencies": {
23
+ "@elastic/eui-docusaurus-theme": "^2.1.0",
25
24
  "react": "^18.0.0 || ^19.0.0",
26
25
  "react-dom": "^18.0.0 || ^19.0.0"
27
26
  }