[WIP] Watch mode in EUI
Summary
Resolves https://github.com/elastic/eui/issues/8636
This PR simplifies the workflow for testing local EUI changes in Kibana. It adds a serve script which launches a new JS script scripts/serve_eui. It watches for changes in packages/eui/src and runs compile_eui script. If --kibana flag is passed, it additionally runs yarn pack and extracts it in ../kibana/node_modules/@elastic/eui. If --no-declarations flag is passed, it skips the d.ts files generation which saves ~30s.
Why are we making this change?
We are making this change to improve local development in EUI.
The goal is, along with the changes in Kibana, to have a seamless way to test local EUI changes in Kibana without having to repack EUI on each change and bootstrap Kibana which can last from 10 to 20 minutes. Now, it lasts up to 1 minute and eliminates the manual chore.
Please read the linked task to learn more.
Screenshots #
https://github.com/user-attachments/assets/e9ab9c01-36a5-40e9-844c-82b4032ca809
Impact to users
🟢 This is not a breaking change. It doesn't affect existing compile_eui script. It adds a new serve script.
QA
- [ ] verify that running
yarn workspace @elastic/eui serveworks and generates type declarations - [ ] verify that running
yarn workspace @elastic/eui serve --no-declarationsworks and doesn't generates type declarations - [ ] verify that running
yarn workspace @elastic/eui serve --no-declarations --kibanaworks and doesn't generates type declarations, tars and unpacks the archive in Kibananode_modules
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 9ec99c1d30101e70e3196652066eec39687bb046
- Documentation website
- Storybook
History
- :green_heart: Build #2151 succeeded 37838825c329c465c6e327cf09a5c9292b7b7699
cc @weronikaolejniczak
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 9ec99c1d30101e70e3196652066eec39687bb046
History
- :green_heart: Build #5378 succeeded 37838825c329c465c6e327cf09a5c9292b7b7699
cc @weronikaolejniczak