-
Notifications
You must be signed in to change notification settings - Fork 928
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
expand the documentation on how to use firebase-tools as a module #322
Comments
There is a sample
But I had to install firebase-tools (without -g) for that to work. Tried something like this
due to the lack of documentation but got this error
A proper set of samples of using this will be great please. |
I'm struggling to get anything working here too. |
I struggled with this until I dug into the source. So, until we have docs for this I think this works:
Examples:
Also, I don't think you need to add a Read more in this file and commands directory: |
@jesperp thanks for your clear and concise explanation! Even as someone who "knows" the answer to this, I will refer to your answer when I forget until we get the docs up. |
I’m having errors with config:set. Can’t seem to figure out their expected syntax for environment variables. I would expect After debugging I found it loops though the argument string, letter by letter instead of as an array. So it takes the “m” of “my_var” and complains. I’ve tried passing an array instead like so: |
@danielpox hmmm I have some scripts which use the syntax you mentioned with no problems, for example: So I do:
And it all works. If you're still having this issue could you please put together a simple reproduction and open a new issue on this repo? |
@samtstern I see. I tried running the CLI instead, and it turns out
I found an option to run the CLI directly instead of as a module, as part of an npm script, but good to understand how the module syntax works. Thank you! |
A lot of the commands you can do via
CLI
are very hard to figure out how to do programmatically when loading it as a module. Updated documentation on syntax, available commands, etc, would be helpful.Questions I have (or had but soluved):
tools.functions.config.get
The text was updated successfully, but these errors were encountered: