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
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
// Express Servers | |
const {simpleServer, corsServer, cleanPathServer} = require('./server'); | |
// HTTP Cloud Functions | |
const simple = functions.https.onRequest(simpleServer); |
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
FROM node:10-alpine | |
RUN apk add ca-certificates | |
ENV NODE_ENV=production | |
WORKDIR /urs/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --production |
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 functions = require('firebase-functions'); | |
exports.englishSyntax = functions.pubsub | |
.schedule('every 10 minutes') | |
.timeZone('Australia/NSW') | |
.onRun(context => { | |
console.log('triggered every 10 minutes', context); | |
}); | |
exports.cronSyntax = functions.pubsub |
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
import { onNewUser } from "./onNewUser/function"; | |
// functions in this object will be prefixed with "users" | |
// Eg: auth-onNewUser | |
const auth = { onNewUser }; | |
export { auth }; |
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
+- dist/ # compiled code | |
| | | |
| +- index.js # CF entrypoint, defined by pkg.json "main" field | |
| +- index.js.map # maps compiled to raw source in ../src/ | |
+- node_modules/ # ignored by firebase-tools on upload | |
+- src/ # raw source code to compile | |
| | | |
| +- index.<ext> # entrypoint to compile | |
+- <config file> # config file depending on the tool | |
+- .firebaserc # firebase project identification config |
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
type options = { | |
. | |
"dir": string, | |
"key": string | |
}; | |
let defaultOptions: options = {"dir": "conf/", "key": "configuration"}; | |
let createConf = (~opts=defaultOptions, ()) => Js.log(opts); |
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') |
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
--- | |
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 |