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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: option to show baseURL in showURL #28

Merged
merged 4 commits into from Jun 13, 2022
Merged

feat: option to show baseURL in showURL #28

merged 4 commits into from Jun 13, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented Jun 7, 2022

No description provided.

@antfu
Copy link
Member Author

antfu commented Jun 7, 2022

CI unrelated, fix in #29

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated
const add = opts.clipboard ? gray('(copied to clipboard)') : ''
const lines = []
lines.push(` > Local: ${formatURL(url)} ${add}`)
const baseURL = (options?.baseURL || opts.baseURL || '').slice(1)
Copy link
Member

Choose a reason for hiding this comment

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

We can use ufo.withoutLeadingSlash instead of slice to handle cases without leading / (or ufo.joinURL to join :)

@pi0 pi0 changed the title feat: show baseURL in showURL feat: option to show baseURL in showURL Jun 13, 2022
@pi0 pi0 merged commit 4ce9347 into main Jun 13, 2022
@pi0 pi0 deleted the fix/show-base-url branch June 13, 2022 15:06
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.

None yet

2 participants