From 737e6f1c25c583e0c1099134b21b375c1900657b Mon Sep 17 00:00:00 2001 From: Pascal Date: Thu, 19 Mar 2020 15:38:02 +0100 Subject: [PATCH] feat: added firebase plugin --- plugins/firebase/README.md | 45 ++++++++++++++++++++++++++++ plugins/firebase/firebase.plugin.zsh | 33 ++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 plugins/firebase/README.md create mode 100644 plugins/firebase/firebase.plugin.zsh diff --git a/plugins/firebase/README.md b/plugins/firebase/README.md new file mode 100644 index 000000000..792af12a2 --- /dev/null +++ b/plugins/firebase/README.md @@ -0,0 +1,45 @@ +## Firebase plugin + +The Firebase plugin provides useful aliases for the [Firebase CLI](https://firebase.google.com/docs/cli). + +To use it, add firebase to the plugins array of your zshrc file: + +``` +plugins=(... firebase) +``` + +## Aliases + +Reference: https://firebase.google.com/docs/cli#admin-commands +(Only implemented often used commands.) + +```zsh +### INIT (FBI) - https://firebase.google.com/docs/cli#initialize_a_firebase_project +alias fbi="firebase init" # Initialize a Firebase project + +# USE (FBU) - https://firebase.google.com/docs/cli#add_alias +alias fbu="firebase use" # Use a firebase project +alias fbua="firebase use -add" # Add and use a firebase project + +# SERVE (FBS) - https://firebase.google.com/docs/cli#test-locally +alias fbs="firebase serve" # Serve a Firebase project locally +alias fbs0="firebase serve --host 0.0.0.0" # Serve a Firebase projeczt on 0.0.0.0 +alias fbsh="firebase serve --only hosting" # Serve a Firebase project locally () +alias fbsf="firebase serve --only functions" # Serve a Firebase project locally () + +# DEPLOY (FBD) - https://firebase.google.com/docs/cli#partial_deploys +alias fbd="firebase deploy" # Deploy Firebase (Complete) +alias fbdh="firebase deploy --only hosting" # Deploy Firebase Hosting +alias fbdd="firebase deploy --only database" # Deploy Firebase Realtime Database +alias fbds="firebase deploy --only storage" # Deploy Firebase Storage +alias fbdfs="firebase deploy --only firestore" # Deploy Firebase Firestore +alias fbdfsr="firebase deploy --only firestore:rules" # Deploy Firebase Firestore (only Rules) +alias fbdfsi="firebase deploy --only firestore:indexes" # Deploy Firebase Firestore (only Indexes) +alias fbdfu="firebase deploy --only functions" # Deploy Firebase Functions + +# FUNCTIONS (FBF) - https://firebase.google.com/docs/cli#delete_functions +alias fbfd="firebase functions:delete" # Delete Firebase Function + +# MISC (FBx) +alias fbp="firebase projects:list" # List all projects +``` \ No newline at end of file diff --git a/plugins/firebase/firebase.plugin.zsh b/plugins/firebase/firebase.plugin.zsh new file mode 100644 index 000000000..3535ff85d --- /dev/null +++ b/plugins/firebase/firebase.plugin.zsh @@ -0,0 +1,33 @@ +## Aliases + +# https://firebase.google.com/docs/cli#admin-commands +# Only implemented often used commands. + +# INIT (FBI) - https://firebase.google.com/docs/cli#initialize_a_firebase_project +alias fbi="firebase init" # Initialize a Firebase project + +# USE (FBU) - https://firebase.google.com/docs/cli#add_alias +alias fbu="firebase use" # Use a firebase project +alias fbua="firebase use -add" # Add and use a firebase project + +# SERVE (FBS) - https://firebase.google.com/docs/cli#test-locally +alias fbs="firebase serve" # Serve a Firebase project locally +alias fbs0="firebase serve --host 0.0.0.0" # Serve a Firebase projeczt on 0.0.0.0 +alias fbsh="firebase serve --only hosting" # Serve a Firebase project locally () +alias fbsf="firebase serve --only functions" # Serve a Firebase project locally () + +# DEPLOY (FBD) - https://firebase.google.com/docs/cli#partial_deploys +alias fbd="firebase deploy" # Deploy Firebase (Complete) +alias fbdh="firebase deploy --only hosting" # Deploy Firebase Hosting +alias fbdd="firebase deploy --only database" # Deploy Firebase Realtime Database +alias fbds="firebase deploy --only storage" # Deploy Firebase Storage +alias fbdfs="firebase deploy --only firestore" # Deploy Firebase Firestore +alias fbdfsr="firebase deploy --only firestore:rules" # Deploy Firebase Firestore (only Rules) +alias fbdfsi="firebase deploy --only firestore:indexes" # Deploy Firebase Firestore (only Indexes) +alias fbdfu="firebase deploy --only functions" # Deploy Firebase Functions + +# FUNCTIONS (FBF) - https://firebase.google.com/docs/cli#delete_functions +alias fbfd="firebase functions:delete" # Delete Firebase Function + +# MISC (FBx) +alias fbp="firebase projects:list" # List all projects \ No newline at end of file