Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

firebase-tools-extra

prescottprue1.4kMIT1.0.0TypeScript support: included

Extra functionality for firebase-tools with support for emulators and auth through service account.

firebase-tools, firebase, cli

readme

firebase-tools-extra

NPM version Build Status Coverage License Code Style

Extra functionality for firebase-tools with support for emulators and auth through service account

Installation

npm i --save-dev firebase-tools-extra

Setup

  1. Generate a service account from within the settings section of the Firebase console
  2. Save the service account to serviceAccount.json within your firebase project repo (or set SERVICE_ACCOUNT environment variable)
  3. Make sure you add serviceAccount.json to your .gitignore so it is not committed as part of your changes - THIS IS EXTREMELY IMPORTANT

To use with emulators:

  1. Do one of the following:
    • Pass the --emulator flag along with your command
    • Set FIREBASE_DATABASE_EMULATOR_HOST and FIRESTORE_EMULATOR_HOST variabes to your environment
  2. Use firebase-tools-extra the same way you would firebase-tools: firebase-extra database:get /users

Usage

firebase-tools-extra should be used the same way that firebase-tools is used - the API is as close to the same as possible:

firebase-extra database:get --limit-to-last 10 /users

Tests

To run all unit tests, run yarn test. This starts emulators, runs tests, then shuts down emulators.

Local Test Dev

  1. Start emulators: yarn emulate
  2. Run tests and watch for changes: yarn test:watch (NOTE: if you don't want the file watcher on use yarn test:base)

Why

firebase-tools does not have the following:

License

MIT

changelog

Change Log

This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the Github Releases page.