Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

firebase-functions-instance

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-functions-instance

Methods and Helpers for Firebase cloud functions, Firestore, RTDB, and more

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Firebase Functions with Babel config to target the correct Execution Environment

Use Babel to target the correct execution environment for Cloud Functions for Firebase and use modern languages features (ES6+) to develop.

Here is the accompanying Medium post.

Project Layout Description

I suggest developing your Cloud Functions in the src/functions/ directory and output everything to a dist/functions/ folder. By using a single root package.json we remove the need for maintaining and possibly merging two or more for the Functions themselves and other code, like a frontend app.

Use @babel/core, @babel/cli and @babel/preset-env with some npm scripts to compile to the Cloud Functions server runtime of NodeJS v6.11.5. The output directory, dist/functions/ is created on compilation in the deploy step (yarn deploy).

Firebase predeploy scripts are used in the firebase.json to coordinate which npm scripts get called before deploying to ensure everything is built.

Download & Install

# Clone this dir
curl https://codeload.github.com/jthegedus/blog-code/tar.gz/master | tar -xz --strip=1 blog-code-master/firebase-functions-es6-babel
cd firebase-functions-es6-babel
# Install
yarn

Login to the Firebase CLI

If you're using firebase-tools globally, then skip to the Deploy to Firebase step.

yarn fblogin

Local Testing

yarn serve

Deploy to Firebase

Update .firebaserc to use your Firebase project id.

yarn deploy

Keywords

FAQs

Package last updated on 26 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc