tool | package | size(K) | gzipped(K) |
---|---|---|---|
Firebase | firebase |
412 | 116 |
Firebase client core | @firebase/app |
19.4 | 6.27 |
Authentication | @firebase/auth |
134.81 | 43.42 |
Realtime DB | @firebase/database |
193.34 | 47.15 |
Cloud Messaging | @firebase/messaging |
19.66 | 5.63 |
Cloud Storage | @firebase/storage |
35.89 | 10.5 |
Total | 403.1 | 112.97 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input - using CommonJS module syntax | |
const functions = require('firebase-functions') | |
module.exports.helloWorld = functions.https.onRequest((req, res) => { | |
let world = `from Babelified Cloud Functions!`; | |
res.status(200).send(`Hello ${world}`); | |
}) | |
// Babel output - with Babel REPL settings: | |
// * preset-es2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input - using ES module syntax | |
import * as functions from 'firebase-functions'; | |
export let helloWorld = functions.https.onRequest((req, res) => { | |
let world = `from Babelified Cloud Functions!`; | |
res.status(200).send(`Hello ${world}`); | |
}) | |
// Babel output - with Babel REPL settings: | |
// * prettify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Babel output - with Babel REPL settings: | |
// * preset-es2015 | |
"use strict"; | |
var functions = require("firebase-functions"); | |
var message = function message() { | |
return new Promise(function(resolve) { | |
setTimeout(function() { | |
resolve("from Babelified Cloud Functions!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Babel output - with Babel REPL settings: | |
// * prettify | |
// * preset-es2015 (es6->es5) | |
// * preset-es2016 (es7->es6) | |
// * preset-es2017 (es8->es7) | |
"use strict"; | |
function _asyncToGenerator(fn) { | |
return function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Babel output - with Babel REPL settings: | |
// * prettify | |
// * preset-env Node v6.9 | |
"use strict"; | |
function _asyncToGenerator(fn) { | |
return function() { | |
var gen = fn.apply(this, arguments); | |
return new Promise(function(resolve, reject) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input - async/awaiy with CommonJS module syntax | |
const functions = require('firebase-functions'); | |
// returns a string after 5 seconds | |
const message = () => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(`from Babelified Cloud Functions!`) | |
}, 5000) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
root: true | |
# Use create-react-app eslint config as it does not apply styling rules (use prettier for styling) - https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app | |
# | |
# yarn add eslint-config-react-app babel-eslint@^7.2.3 eslint@^4.1.1 eslint-plugin-flowtype@^2.34.1 eslint-plugin-import@^2.6.0 eslint-plugin-jsx-a11y@^5.1.1 eslint-plugin-react@^7.1.0 | |
# yarn add eslint-plugin-import | |
extends: | |
- react-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default () => <div>File one</div>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nextEnv = require('next-env'); | |
const nextEnvOpts = { ... }; | |
module.exports = (phase, {defaultConfig}) => { | |
return nextEnv(nextEnvOpts, defaultConfig, phase); // explicitly pass phase | |
} | |
/// with other plugins | |
const withTypescript = require('@zeit/next-typescript') |