Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-6659: Auto build toolkit on changes #82

Merged
merged 4 commits into from
Oct 24, 2023
Merged

CC-6659: Auto build toolkit on changes #82

merged 4 commits into from
Oct 24, 2023

Conversation

ellacai
Copy link
Collaborator

@ellacai ellacai commented Oct 19, 2023

πŸ› οΈ Description

Now you can do a yarn watch:toolkit which will watch for changes in toolkit/src and automatically rebuild so the documentation app will have the latest changes.
Before, you had to run yarn prepare after each toolkit change.

πŸ“Έ Screenshots

video1435768332.mp4

πŸ”— External Links

jira

πŸ—οΈ How to Build and Test the Change

πŸ‘ Definition of Done

  • New functionality works?
  • Tests added?
  • Docs updated?

πŸ’¬ Using the Netlify feedback ladder

  • πŸ—» [mountain]: Blocking and requires immediate action.
  • πŸ—Ώ [boulder]: Blocking.
  • βšͺ [pebble]: Non-blocking, but requires future action.
  • ⏳ [sand]: Non-blocking, but requires future consideration.
  • ✨ [dust]: Non-blocking. "Take it or leave it"

@ellacai ellacai requested a review from a team as a code owner October 19, 2023 19:32
@vercel
Copy link

vercel bot commented Oct 19, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
consul-ui-toolkit-documentation βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 19, 2023 10:56pm

Copy link
Contributor

@WenInCode WenInCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work great. Only thing that isn't working for me is if I create a new component it doesn't seem to work in the docs unless I kill it and re prepare. I am not sure what is the cause. Maybe try looking into it a bit more, but this is still a nice improvement.

- Run `yarn prepare` after any changes to the toolkit to build it to be consumed by the documentation app.
- Run `yarn start:documentation` to start the documentations apps server
- Run `yarn watch:toolkit` - This will automatically detect changes in the toolkit and build it to be consumed by the documentation app.
- In a separate terminal, run `yarn start:documentation` to start the documentations apps server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a good idea to mention that this is using fb-watchman and maybe link to their docs.

@ellacai ellacai added the pr/no-changeset PR does not need a corresponding .changeset label Oct 19, 2023
@ellacai
Copy link
Collaborator Author

ellacai commented Oct 19, 2023

Seems to work great. Only thing that isn't working for me is if I create a new component it doesn't seem to work in the docs unless I kill it and re prepare. I am not sure what is the cause. Maybe try looking into it a bit more, but this is still a nice improvement.

hmm if you create a new component, wouldn't the documentation app throw a Attempted to resolve 'cut/new-component', which was expected to be a component, but nothing was found. error that requires a kill and re-build anyways?

maybe i'm misunderstanding but I thought that was expected ❓

@WenInCode
Copy link
Contributor

@ellacai Try this flow

  1. Start the documentation app
  2. Add a simple component to toolkit like Cut::Fake that just renders a div with some text
  3. Run yarn prepare
  4. Try to use that component in documentation without restarting the build.

I'm pretty sure it will work πŸ€”

@ellacai
Copy link
Collaborator Author

ellacai commented Oct 24, 2023

@ellacai Try this flow

  1. Start the documentation app
  2. Add a simple component to toolkit like Cut::Fake that just renders a div with some text
  3. Run yarn prepare
  4. Try to use that component in documentation without restarting the build.

I'm pretty sure it will work πŸ€”

I gave it a try and I think I get the same error?
We can revisit this in a future improvement! Will merge as is for now.

@ellacai ellacai merged commit f07f73b into main Oct 24, 2023
14 of 15 checks passed
@ellacai ellacai deleted the CC-6659 branch October 24, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changeset PR does not need a corresponding .changeset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants