npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@butlerlogic/firebase

v1.0.3

Published

A library for simplifying the workflow when developing on the Google Firebase platform.

Downloads

12

Readme

firebase

Simplify the workflow of developing Firebase applications.

Key Features

  • Configure & deploy Firebase environment variables.

Getting Started

This library assumes the Firebase tools have been installed and are accessible (i.e. in the PATH). If you do not have the Firebase tools or are unsure, run npm install -g firebase-tools and see the CLI documentation for details.

Install this utility as a development dependency within your project.

npm install @butlerlogic/firebase --save-dev

If you want to use the commands directly (i.e. not within an npm command), you'll also need to install the library with the global flag.

npm install -g @butlerlogic/firebase

Firebase Functions

Firebase functions are, generally, pretty straightforward to work with. However; synchronizing environment variables is more challenging, especially in team environments.

Environment variables are managed in a file called .runtimeconfig.json. This file should never be committed to git, which means it is never available when you start working on a project.

If you are working with an existing project, run fb setup to automatically generate the appropriate .runtimeconfig.json file. It does not know what the values of each environment variable should be, but it will identify all of the variables used in the code base and structure the file properly.

There is also a command that will read the .runtimeconfig.json and automatically update the remote Firebase environment with the values found in the file. This can be done by running fb configure

Recommendation

It's typically best to set this up as an npm command. Consider the following package.json:

{
  "name": "my_firebase_functions",
  "version": "1.0.0",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "serve": "firebase serve --only functions,database",
    "shell": "firebase functions:shell",
    "start": "firebase emulators:start --only functions",
    "logs": "firebase functions:log",
    "deploy": "fb deploy",
    "configure": "fb configure",
    "setup": "fb setup"
  },
  "engines": {
    "node": "8"
  },
  "dependencies": {
    "firebase-admin": "^8.0.0",
    "firebase-functions": "^3.1.0"
  },
  "devDependencies": {
    "@butlerlogic/firebase": "^1.0.0",
  },
  "private": true
}