-
Notifications
You must be signed in to change notification settings - Fork 688
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
Strip down wrangler.toml templates #6922
base: main
Are you sure you want to change the base?
Conversation
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-wrangler-6922 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6922/npm-package-wrangler-6922 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-wrangler-6922 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-create-cloudflare-6922 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-cloudflare-kv-asset-handler-6922 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-miniflare-6922 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-cloudflare-pages-shared-6922 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-cloudflare-vitest-pool-workers-6922 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-cloudflare-workers-editor-shared-6922 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11231813270/npm-package-cloudflare-workers-shared-6922 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Goal of having this here is
Can see how looks inelegant but would want to replace with something we believe genuinely more effective for onboarding and adoption of full platform, not just remove. @nevikashah wdyt? |
Noble goal. My own experience is that this scared me the first time I generated a project. For the records I have discussed with a few people and they were +1 to strip this |
I am also put off by this large commented block; moreover it is a pain to maintain since every time someone adds a binding we have to go and update all these templates. How about we just have a single comment that links to a web page in the docs that shows a fully featured example wrangler.toml wired up to lots of bindings? |
Wouldn't "a web page in the docs that shows a fully featured example wrangler.toml wired up to lots of bindings" move the exact same problem to a different place? IIUC the initial intent was to help new comers. Can't we have an example with a few bindings (do we have stats on the most common? probably assets, KV, plus a couple others) and link to that. For more advanced users we can link the (reference) docs and they'll be able to find what they want there. |
I believe it would be better for two reasons:
|
I mentioned that in the PR description:
(That still holds if we move to a more reasonably sized comment) |
@irvinebroque @nevikashah Can we please move forward here? I really think we should keep things simple and not overwhelm fist time users with hundreds of lines of commented out configuration lines - in the same spirit, I've proposed #6957. Providing a short text and a link to the documentation would be as efficient without making workers look more complicated than they really are. Thanks! |
What this PR solves / how to test
The
wrangler.toml
templates have 100+ lines of commented out template config.I think it doesn't help users and potentially could make them think workers are more complex than they really are.
This is only a draft PR to get feedback.
What would be great is first to agree on the wording.
Then we should probably automatically inject the comments in all
wrangler.toml
instead of having to maintain 20 versions of those comments.@irvinebroque @petebacondarwin thoughts?
Fixes N/A
Author has addressed the following