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

feat: loading indicator #523

Merged
merged 2 commits into from Apr 26, 2024
Merged

feat: loading indicator #523

merged 2 commits into from Apr 26, 2024

Conversation

devjiwonchoi
Copy link
Sponsor Contributor

Closes #512

@@ -59,6 +59,7 @@
"arg": "^5.0.2",
"clean-css": "^5.3.3",
"magic-string": "^0.30.8",
"ora": "^5.4.1",
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

ora v6 and above is native ESM, where @swc-node/register breaks.
Tried @swc-node/register/esm and @swc-node/register/esm-register but AFAIU those are target for esm projects, and it also breaks in current project settings.
A bit lazy solution but since we're using a simple indicator, we can stick to v5.4.1 IMO.

Comment on lines +151 to +155
const spinner = ora({
text: 'bundling...\n\n',
spinner: 'dots',
color: 'green',
})
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

LMK how you'd like the output to behave.
Current:

Screen.Recording.2024-04-26.at.3.11.49.PM.mov

try {
spinner.start()
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

We could use oraPromise, but it outputs a green checkmark where it can't be opted-out by default.

@devjiwonchoi devjiwonchoi marked this pull request as ready for review April 26, 2024 06:17
@huozhi
Copy link
Owner

huozhi commented Apr 26, 2024

Fantastic!! 😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮

Copy link
Owner

@huozhi huozhi left a comment

Choose a reason for hiding this comment

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

Thank you!

@huozhi huozhi merged commit c371f9b into huozhi:main Apr 26, 2024
4 checks passed
@huozhi
Copy link
Owner

huozhi commented Apr 26, 2024

@devjiwonchoi I found sometimes it swallow the content. I think we need to stop before we log everything in output plugin

> bunchee@5.1.2 tsx /Users/huozhi/code/bunchee
> node -r @swc-node/register "./src/bin/index.ts" "--cwd" "test/integration/subpath-imports-ts"

⠹ building...


✓ bunchee 5.1.2 build completed

huozhi added a commit that referenced this pull request Apr 26, 2024
huozhi added a commit that referenced this pull request Apr 26, 2024
@huozhi
Copy link
Owner

huozhi commented Apr 26, 2024

Revert atm for patch

@devjiwonchoi devjiwonchoi deleted the loading-indicator branch April 27, 2024 00:17
@devjiwonchoi
Copy link
Sponsor Contributor Author

Got it!! Will investigate further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading indicator in terminal during building
2 participants