3

I experimented with firebase functions for the init part and it has created a folder for me. Now when I deploy each time it also picks up the functions folder. When I remove the functions folder I get an error, when deploying. How do I deploy everything but functions?

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
user3385829
  • 117
  • 1
  • 9

3 Answers3

7

firebase deploy has a parameter --except . So to deploy everything except functions you can run:

firebase deploy --except functions
Bang
  • 1,107
  • 11
  • 11
3

You can use the only option/flag, for example firebase deploy --only hosting,storage, see the CLI doc.

You can also use deploy targets which "are short-name identifiers (that you define yourself) for Firebase resources in your Firebase project".

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
  • Is it possible to remove the firebase functions folder from being picked up? When I delete it, I get an error. Your solution should solve for my purposes here, but just asking out of curiosity. – user3385829 Jul 22 '20 at 18:05
1

Check to make sure that you have removed the implicit reference to the function in your index.js and then running firebase deploy should do the trick. If you want to explicitly delete the function completely, you can use the firebase functions:delete <myFunction> and then delete the functions folder. You can find more details in the doc here

MaryM
  • 164
  • 4