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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wrangler] Please document the --var and --define arguments #6022

Closed
rozenmd opened this issue Sep 28, 2022 · 0 comments · Fixed by #6160
Closed

[Wrangler] Please document the --var and --define arguments #6022

rozenmd opened this issue Sep 28, 2022 · 0 comments · Fixed by #6160
Assignees

Comments

@rozenmd
Copy link
Contributor

rozenmd commented Sep 28, 2022

Discussed in cloudflare/workers-sdk#1807

Originally posted by AaronBeaudoin September 9, 2022
By running wrangler dev -h I found this:

--var        A key-value pair to be injected into the script as a variable  [array]
--define     A key-value pair to be substituted in the script  [array]

Some more explanation regarding these would be appreciated. A few points:

  1. Neither of these arguments are anywhere at https://developers.cloudflare.com/workers/wrangler/commands.
  2. When I tried using --var, it took me some time to figure out why TEST=testing didn't work. Turns out the =, which seemed like the natural character, actually needed to be a :. It seems this is currently only discoverable by trial and error.
  3. It's not clear to me what --define does. Some docs with example code would go a long way towards clearing these up.

Thanks so much!

@rozenmd rozenmd transferred this issue from cloudflare/workers-sdk Sep 28, 2022
@rozenmd rozenmd self-assigned this Sep 28, 2022
@rozenmd rozenmd changed the title [Workers] Please document the --var and --define arguments [Wrangler] Please document the --var and --define arguments Sep 28, 2022
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 a pull request may close this issue.

1 participant