-
Notifications
You must be signed in to change notification settings - Fork 5
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
Docs #119
Docs #119
Conversation
commit: |
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.
Changes in this file are just to make the naming more consistent with the docs.
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.
Overall this looks really good and comprehensive to me. I left a few notes here and there with clarifications, but I think overall this make sense to me.
I'm approving this assuming that we resolve all the comments via edits an agreement to take no action.
Thank you @jamesopstad!
- Supports Workers Assets, enabling you to build static sites, SPAs and full-stack applications | ||
- Leverages Vite's hot-module reloading for consistently fast updates | ||
- Supports `vite preview` for previewing your build output in the Workers runtime prior to deployment | ||
|
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 would also be a good place to mention that this plugin doesn't fully replace the need to have Wrangler installed as well and that wrangler is needed to read the config from wrangler.toml/json and deploy the final application.
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.
It might be a bit wordy to include this here before the Quick Start. Is it not clear that it's included as a dependency to install?
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.
LGTM once Igor and Dario's comments have been addressed
{ "path": "./tsconfig.app.json" }, | ||
{ "path": "./tsconfig.node.json" }, |
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.
Does the Vite React creation tool generate the tsconfig.app.json
and tsconfig.node.json
?
If so, how come it doesn't already include the TypeScript dependency?
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.
It does generate those files and includes the TypeScript dependency. Not quite sure what you mean?
A minor comment that just occurred to me, given the recent push for I think that'd make sense, it also doesn't need to be addressed in this PR (since it would probably be good to also update the config files in the various playground apps) One concern I have docs wise is that now we get a bit of a stronger distinction between the userland/input |
2e86313
to
eac8831
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.
Just left a bunch of grammar/clarity suggestions. Feel free to ignore any that don't make sense for the context.
Note: We always use the oxford comma.
Also, I noticed that it was jumping between the first, second, and third person a lot, so I removed the "we", "us", "let's", etc. to keep a little more consistent.
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: ToriLindsay <[email protected]>
dab15e7
to
26bf2ff
Compare
@@ -26,6 +26,10 @@ import { getWarningForWorkersConfigs } from './workers-configs'; | |||
import type { PluginConfig, ResolvedPluginConfig } from './plugin-config'; | |||
import type { Unstable_RawConfig } from 'wrangler'; | |||
|
|||
/** | |||
* Cloudflare Vite plugin. | |||
* Accepts an optional {@link PluginConfig} object. |
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.
Should we have a more detailed description? (briefly mentioning what the plugin does/what it can be used for etc...)
For the parameter, why not a standard @param
tag? 😮
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.
To be honest, I just followed Vite's example here - https://github.com/vitejs/vite/blob/4f5845a3182fc950eb9cd76d7161698383113b18/packages/vite/src/node/config.ts#L137-L141.
Feel free to make a suggestion.
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.
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.
Thanks. Let's add the JSDoc once the readme is in workers-sdk so it points to the right place.
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.
Added some thoughts about the environments section.
README.md
Outdated
|
||
## Worker environments | ||
|
||
A Worker config file may contain configuration for multiple [environments](https://developers.cloudflare.com/workers/wrangler/environments/). |
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.
A Worker config file may contain configuration for multiple [environments](https://developers.cloudflare.com/workers/wrangler/environments/). | |
A Worker config file may contain configuration for multiple [Wrangler environments](https://developers.cloudflare.com/workers/wrangler/environments/). |
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.
or possibly
A Worker config file may contain configuration for multiple [environments](https://developers.cloudflare.com/workers/wrangler/environments/). | |
A Worker config file may contain configuration for multiple [Cloudflare environments](https://developers.cloudflare.com/workers/wrangler/environments/). |
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.
Oh I see below that you use the term "Worker environment" - so perhaps that would be best here.
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.
I've called the section 'Worker environments`. I don't think there's any option here that isn't a little confusing because the word 'environments' is used for so many things. I do think that calling them 'Wrangler environments' would potentially be even more confusing though.
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.
I've updated it to 'Worker environments'. Let me know if you would rather I use the term 'Cloudflare environments' throughout the readme though. I'm not sure which is better.
resolves #87
This adds documentation to the readme. I've tried to keep the tutorial as succinct as possible but think it's a nice way to introduce the key concepts.