Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Improve init --site error for existing wrangler.toml #648

Closed
exvuma opened this issue Sep 20, 2019 · 1 comment · Fixed by #931
Closed

Improve init --site error for existing wrangler.toml #648

exvuma opened this issue Sep 20, 2019 · 1 comment · Fixed by #931
Assignees
Labels
feature Feature requests and suggestions sites
Milestone

Comments

@exvuma
Copy link
Contributor

exvuma commented Sep 20, 2019

💡 Feature request

For wrangler init --site if wrangler.toml exists already instead of erroring, make the worker-site directory and ask the user to append to their wrangler.toml bucket and entry-point

Basic example

Instead of:

this-wrangler init --site
Error: A wrangler.toml file already exists! Please remove it before running this command again.

output

this-wrangler init --site
⬇️ Installing cargo-generate...
⚠️ Append to the parent environment in your wrangler.toml:
[site]
bucket = "./static-folder"
entry-point = "workers-site"
🌀  🐑  Generating a new webpack worker project with name 'workers-site'...
🔧   Creating project called `workers-site`...
✨   Done! New project created /Users/victoriabernard/cf-github/workers-docs/workers-site

Nit: Succesfully should be spelled Successfully while we at it

@exvuma exvuma added feature Feature requests and suggestions user report sites labels Sep 20, 2019
@ashleygwilliams
Copy link
Contributor

so the trick with this is that we don't know what the user's static file directory is called. i can make a PR to improve the message tho- let me see what i can come up with

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests and suggestions sites
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants