-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Astro add docs #2958
Astro add docs #2958
Conversation
🦋 Changeset detectedLatest commit: c5408cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool! Did you borrow this from somewhere? Might be nice to add a comment to link back to the source.
I will do, mainly it was the commands that I found but I will link it back to the source code where I got it from =) |
Is it possible for someone to help me with getting this simple method over the line, I do have some questions, |
It now works !!! I had miss read the cli function properly, when I realised it was a very simple fix, and it now works a peach!! 🚀👨🚀📚 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, I love it! I've left some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied @JuanM04 's recommendations and have moved the cmd('docs')
to the supportedCommands()
Also resolved the import conflicts from the main branch,
Kinda scared of the |
Applied creditation to where I found the 'inspiration' for this application.
Not working 🤷♂️
Embarrasing as it is I totally missed the part where logic was to be in.
76f624d
to
e1df3bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @aFuzzyBear! I pushed up a few changes to clean things up, but amazing work getting this working!
* So This works 😎 * need to add to the cli next * Renamed Files and Export Applied creditation to where I found the 'inspiration' for this application. * applied `astro docs` to cli * Trying to add to CLI, Not working 🤷♂️ * Converted into async method, * 🎆🎆 It works!!! 🥳🎉🥳 Embarrasing as it is I totally missed the part where logic was to be in. * Moved `docs` cmd to `supportedCommands` * refactor: cleanup docs command * chore: add changeset * chore: rename browser to open Co-authored-by: Nate Moore <[email protected]>
The premise of this PR is to introduce the a new cli function
astro docs
.The purpose of this utility function is to launch the systems browser to point to the Astro Docs site.
Progress
browse(url)
- this is the main function that launches the browser.So far, it is agnostic to the following platforms;
It doesnt work on CodeSandbox, as I was unable to find their own built in browser function. The only other thought I had to overcome this is to sniff out the CSB platform and have it open a new window and point it that way.
That is the method works, just cant seem to tie it into the cli properly, I would need to spend a bit more time on that tomorrow.
If all else fails Ill try to apply the 'open' package by sindresorhus, If I continue to have no luck,
Changes
astro docs
//TODO: Don't forget a changeset!
pnpm exec changeset
Testing
I really need to figure this out, perhaps once I get the actual cli bit to work,
Docs
Yet to be written but it should be simple.
## astro docs A single command to launch your systems browser pointing to Astro's Doc site. This is to help provide a fast way to launch the Doc site directly from your terminal!
Something along that line, since there isnt much to it.
Considerations
I am considering the idea of a
astro browser <url>
CLI utility, I find that this could just be a novelty feature that may serve no other purpose than to give those terminal dwellers a fun way of launching a website from within their Astro project,