Skip to content
This repository was archived by the owner on Feb 17, 2019. It is now read-only.

release/0.1.3 #3

Merged
merged 41 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2471e6f
Merge branch 'release/0.1.1' into develop
balazsorban44 Jan 18, 2019
99ec132
Merge branch 'hotfix/0.1.2' into develop
balazsorban44 Jan 18, 2019
46165cf
Merge branch 'master' into develop
balazsorban44 Jan 18, 2019
a2e279f
💚 only send Slack notification, when build fails
balazsorban44 Jan 18, 2019
7d122c2
💥 intentional test break
balazsorban44 Jan 18, 2019
426b2b3
Revert "💥 intentional test break"
balazsorban44 Jan 18, 2019
6186e40
🔖 update changelog
balazsorban44 Jan 18, 2019
202ebbd
:pencil2: fix typo
balazsorban44 Jan 21, 2019
988575b
➕ add Firebase 🔥
balazsorban44 Jan 21, 2019
efdec5a
⬆️ upgrade dependencies
balazsorban44 Jan 21, 2019
4e5da3c
🔧 update yarn.lock
balazsorban44 Jan 21, 2019
7cde504
🎉 initialize Firebase 🔥
balazsorban44 Jan 21, 2019
ddd702d
🚀 add Firebase 🔥 deploy scripts
balazsorban44 Jan 21, 2019
c848dcb
🙈 update .gitignore
balazsorban44 Jan 21, 2019
c426a61
📝 update CHANGELOG.md
balazsorban44 Jan 21, 2019
9a91a7d
➕ add Lighthouse CI
balazsorban44 Jan 21, 2019
9d8a07d
🔧 update yarn.lock
balazsorban44 Jan 21, 2019
b3bb8fb
📝 update CHANGELOG.md
balazsorban44 Jan 21, 2019
c88d6e0
🚧 WIP test if Lighthouse is set up right
balazsorban44 Jan 21, 2019
1a661e3
💚 add lighthouse-ci as global dependency on travis
balazsorban44 Jan 21, 2019
04fbe9e
🔧 update yarn.lock
balazsorban44 Jan 21, 2019
bf5effd
:pencil2: fix typo
balazsorban44 Jan 21, 2019
673a337
🔥 remove dead code
balazsorban44 Jan 21, 2019
f454d52
💚 change website tested by Lighthouse CI
balazsorban44 Jan 21, 2019
94e1cb2
💚 add firebase-tools dependency to travis
balazsorban44 Jan 21, 2019
48b2455
💚 run lighthouse after deploy
balazsorban44 Jan 21, 2019
4e3abb3
🔧 update .eslintrc
balazsorban44 Jan 21, 2019
c52185e
💚 fix CI
balazsorban44 Jan 21, 2019
8085537
🗃 update Firebase configs
balazsorban44 Jan 21, 2019
0848dbb
➕ add eslint-plugin-promise
balazsorban44 Jan 21, 2019
96958a1
🔧 update yarn.lock
balazsorban44 Jan 21, 2019
6e669d2
🔧 update deploy script
balazsorban44 Jan 21, 2019
0c33e76
💚 install dependencies in functions
balazsorban44 Jan 21, 2019
155c336
💚 run tests after build
balazsorban44 Jan 21, 2019
9aa3cc2
💚 cd back to root
balazsorban44 Jan 21, 2019
f10ac29
🚀 leave hosting out when deploy from functions
balazsorban44 Jan 21, 2019
dfe0a20
💚 rearrange scripts
balazsorban44 Jan 21, 2019
2c0d926
💚 don't run clean on build
balazsorban44 Jan 21, 2019
1dad426
💚 add index.js in lib
balazsorban44 Jan 21, 2019
da74dde
📝 update CHANGELOG.md
balazsorban44 Jan 21, 2019
f5239b3
🔖 bump version number
balazsorban44 Jan 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"prettier",
"prettier/react"
],
"settings": {
"react": {
"version": "detect"
}
},
"parser":"babel-eslint",
"rules": {
"require-jsdoc":"warn",
Expand Down
8 changes: 8 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"projects": {
"default": "ecatch-kyst",
"master": "ecatch-kyst",
"staging": "ecatch-kyst-beta",
"develop": "ecatch-kyst-beta"
}
}
20 changes: 14 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

# testing
/coverage
coverage

# 🔐
service-account-credentials.json


# production
/build
build
functions/lib
functions/index.js
rules/database.rules.json


# REVIEW: Should this be ignored?
.firebase/hosting.*

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
36 changes: 26 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,33 @@ cache:
install:
- yarn
- yarn global add codecov
- yarn global add firebase-tools
- yarn global add lighthouse-ci
- cd functions
- yarn
script:
- yarn test:ci
- yarn build
# NOTE: Add deploy
# deploy:
# skip_cleanup: true
# provider: script
# script: firebase deploy -P $TRAVIS_BRANCH --token $FIREBASE_TOKEN
# on:
# all_branches: true
# condition: $TRAVIS_BRANCH =~ ^develop|master$
- yarn build:db:rules
- cd ..
- yarn build
- yarn test:ci
deploy:
skip_cleanup: true
provider: script
script: firebase deploy -P $TRAVIS_BRANCH --token $FIREBASE_TOKEN
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^develop|master$
after_deploy:
# REVIEW: Add thresholds
- yarn lh https://ecatch-kyst.firebaseapp.com/ --pwa=1

notifications:
slack:
secure: Kkfqti/d6pPi9M7co9fjAfS8GIEB42j1tK7KlOyAJwi2SXA31gR2jOmkmyCbVHU94ngFvIwZBVvE646cSLkd7CNryU5Zo+u8LFjpWkPUpT2vWE9TBSnAGWSnwWy6GV0eLJh7QlQtqoAVorTwDbJ/KnyTHt7eycY1uMpkmPxJl7UlL/0/Sxz01OFghcKMNhLUsY3tEjbP5pNWeyKwk5E8i9tyIt3H2pgWxve5p09o87x9WnsPRgkm2EZHth9/4UVCOONsi2Z5uq1blUQMuJj0n0ZXAPgg846jWXzmCzse73yh0iCrXIZG/taRoZFM7pWJTFxP0LjrBm1MXTD3cDGkgdOZHgMsr72e1pCVSgBAptN4aPYrY357jZqYf7YdY6Dm1OjHh7EW9JGuitbuzd6TuvJSmaGETIGJXRk8wrkC084U+WDqxnlK199uG1Gz7hTglywQMWTR6DSKjfQ22/YzqSUVadFod/wiHMQCNH1Qvfml5BLsJEsv4gPLymZOTI4/RRsH3nQGPqxtCvapSrM5IYpz/bd3eRPw/UmmOFFZ6ZuqKifb133oe6htgjbCEuN7080TXUJbShg/OjIAZnfGchS4XE0nmZjsjRquSdiWdw8z3nlqRNySoq8bc4tzR3+rqMl+IQ2tzuW4UO7reA1RrhzJNTYVJ8RTL93N2oMVVTg=
rooms:
secure: W1WDbbycJdPbEbCps0iOuxo2YwvmCFYI/mNWg2cKWemKnuLwsx9XQJrGn8Xi6UXVlDMkHP/pDcchVzDTVxODmA7fkVGsPe4HXY10bpIiJtaXhFtX+ONiIrdXJaqkoA+HhHEksf1VlaEtiSp4dSJh1WswZeLUl6L+EqrQLKsyrwNlDhmoNFWQUf4cDnL1P2PMWd61La9nydpEhQBBk1GK3hnw+O9EazBkzx6QdYsacULUB49kQlgDyk6VU+fZUEAUOQDQa5eziwWtRKXC4pqMDMIo0AvI20YsZGxTdjSKjcB8cEIbJlLSIrLekPpwdVz37085jbOOVtRUks3wUZ9Uk6AjK8fctpk53KHDV2fVI4zmzzj8IzmBvbtDgurht5vQvWiFaRz69Lr0OWCpZX1KkG+COkx/6LSzJhZ2xrfvSPmlPuVvUBBBR18Tga11YsIdqx5JK2CnDgmoz1PuBGJ445k64EoMoWbpmMkmJHiPopEHpZwc72YNztkBORd1Zf04s7cW3xtBP8ygmSjvYc/paD+kdzrnrJYGa8NUCy8zLhv/FF4afi5ykSooP5Xd3p+safkx0ayTbMmARD12+PgcsvuXLWICPyPG52RHpV7c2U676cPVsWdJAF+XRZPHiA3Ij0uVrA79ixIqSR/uZMlSiu34XAiEIUKIcTE9n8RMgk4=
on_success: never
on_failure: always
on_start: never
on_cancel: never
on_error: always
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.1.3] - 2019-01-21
### Changed
- Changed Travis config, to only notify about failures on Slack

### Added
- Add Lighthouse testing to Travis pipeline
- Add Firebase 🔥


## [0.1.2] - 2019-01-18
### Changed
- Changed badge links in the `README.md` to support the private repository
Expand Down
32 changes: 32 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"database": {
"rules": "rules/database.rules.json"
},
"firestore": {
"rules": "rules/firestore.rules",
"indexes": "rules/firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
},
"storage": {
"rules": "rules/storage.rules"
}
}
12 changes: 12 additions & 0 deletions functions/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "8"
},
}
]
],
}
123 changes: 123 additions & 0 deletions functions/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 6
},
"plugins": [
"promise"
],
"extends": "eslint:recommended",
"rules": {
// Removed rule "disallow the use of console" from recommended eslint rules
"no-console": "off",

// Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
"no-regex-spaces": "off",

// Removed rule "disallow the use of debugger" from recommended eslint rules
"no-debugger": "off",

// Removed rule "disallow unused variables" from recommended eslint rules
"no-unused-vars": "off",

// Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
"no-mixed-spaces-and-tabs": "off",

// Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
"no-undef": "off",

// Warn against template literal placeholder syntax in regular strings
"no-template-curly-in-string": 1,

// Warn if return statements do not either always or never specify values
"consistent-return": 1,

// Warn if no return statements in callbacks of array methods
"array-callback-return": 1,

// Require the use of === and !==
"eqeqeq": 2,

// Disallow the use of alert, confirm, and prompt
"no-alert": 2,

// Disallow the use of arguments.caller or arguments.callee
"no-caller": 2,

// Disallow null comparisons without type-checking operators
"no-eq-null": 2,

// Disallow the use of eval()
"no-eval": 2,

// Warn against extending native types
"no-extend-native": 1,

// Warn against unnecessary calls to .bind()
"no-extra-bind": 1,

// Warn against unnecessary labels
"no-extra-label": 1,

// Disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,

// Warn against shorthand type conversions
"no-implicit-coercion": 1,

// Warn against function declarations and expressions inside loop statements
"no-loop-func": 1,

// Disallow new operators with the Function object
"no-new-func": 2,

// Warn against new operators with the String, Number, and Boolean objects
"no-new-wrappers": 1,

// Disallow throwing literals as exceptions
"no-throw-literal": 2,

// Require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,

// Enforce “for” loop update clause moving the counter in the right direction
"for-direction": 2,

// Enforce return statements in getters
"getter-return": 2,

// Disallow await inside of loops
"no-await-in-loop": 2,

// Disallow comparing against -0
"no-compare-neg-zero": 2,

// Warn against catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 1,

// Disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,

// Enforce return statements in callbacks of array methods
"callback-return": 2,

// Require error handling in callbacks
"handle-callback-err": 2,

// Warn against string concatenation with __dirname and __filename
"no-path-concat": 1,

// Prefer using arrow functions for callbacks
"prefer-arrow-callback": 1,

// Return inside each then() to create readable and reusable Promise chains.
// Forces developers to return console logs and http calls in promises.
"promise/always-return": 2,

//Enforces the use of catch() on un-returned promises
"promise/catch-or-return": 2,

// Warn against nested then() or catch() statements
"promise/no-nesting": 1
}
}
1 change: 1 addition & 0 deletions functions/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
33 changes: 33 additions & 0 deletions functions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"deploy:db": "yarn build:db:rules; firebase deploy --only database",
"deploy:fs": "firebase deploy --only firestore",
"logs": "firebase functions:log",
"lint": "./node_modules/.bin/eslint src",
"clean": "rm index.js; rm -rf lib",
"serve": "firebase serve --only functions",
"start": "firebase experimental:functions:shell",
"get:indexes": "firebase firestore:indexes > ../rules/firestore.indexes.json",
"build": "babel src/index.js -o index.js; babel src/lib -d lib",
"build:db:rules": "firebase-bolt ../rules/database.rules.bolt",
"deploy:functions": "yarn build; firebase deploy --only functions",
"deploy:storage": "firebase deploy --only storage",
"deploy": "yarn build:db:rules; yarn build; firebase deploy --except hosting"
},
"dependencies": {
"firebase-admin": "~6.0.0",
"firebase-functions": "^2.1.0"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"babel-eslint": "^10.0.1",
"eslint": "^5.12.1",
"eslint-plugin-promise": "^4.0.1",
"firebase-bolt": "^0.8.4"
},
"private": true
}
8 changes: 8 additions & 0 deletions functions/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as functions from 'firebase-functions'

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
1 change: 1 addition & 0 deletions functions/src/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//
Loading