Is there any way to get the Firebase command line to simply refresh the server as I am applying changes to code similar to what nodemon does for nodeJS? I'm working with Polymer for web.
adding to @grigson, you can also use the exec flag to run a package.json script eg:
nodemon -e ts --exec "npm run serve"
where serve is the command in your functions package.json (ie.
{
"name": "functions",
"scripts": {
...
"serve": "npm run build && firebase serve --only functions",
...
}
By running this, nodemon will also run build before serve. The -e flag tells nodemon to watch for changes in files with a .ts extension.
I'm using nodemon with firebase cloud function, as [email protected] (current)
firebase serve --only functions
detects changes only in index.js
this can be handled with nodemon --exec
flag
nodemon --exec firebase serve --only functions
This is not currently a feature of the Firebase CLI, but it sounds like something that would be useful. Please file a feature request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With