Skip to content

Commit

Permalink
🎨 improve code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jan 30, 2019
1 parent bbfc857 commit 9f0854c
Show file tree
Hide file tree
Showing 10 changed files with 3,016 additions and 1,540 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions functions/.eslintrc.json → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Required for certain syntax usages
"ecmaVersion": 6
},
"parser": "babel-eslint",
"plugins": [
"promise"
],
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
"yarn lint"
],
"source": "functions"
},
Expand Down
17 changes: 5 additions & 12 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,24 @@
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"deploy:db": "yarn build:db:rules; firebase deploy --only database",
"deploy:db": "cd .. yarn build:db:rules; cd functions; 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:functions": "cd ..;yarn build;cd functions;firebase deploy --only functions",
"deploy:storage": "firebase deploy --only storage",
"deploy": "yarn build:db:rules; yarn build; firebase deploy --except hosting"
"deploy": "cd ..;yarn build:db:rules;yarn build;cd functions;firebase deploy --except hosting",
"lint": "cd ..; yarn lint"

},
"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
Expand Down
1,598 changes: 72 additions & 1,526 deletions functions/yarn.lock

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@
"version": "0.1.0",
"private": true,
"scripts": {
"build": "babel src/index.js -o functions/index.js; babel src/lib -d functions/lib",
"build:db:rules": "firebase-bolt rules/database.rules.bolt",
"deploy": "yarn deploy:server",
"deploy:db": "cd functions; yarn deploy:db",
"deploy:fs": "cd functions; yarn deploy:fs",
"deploy:storage": "cd functions; yarn deploy:storage",
"deploy:functions": "cd functions; yarn deploy:functions",
"deploy:server": "cd functions; yarn deploy"
"deploy:server": "cd functions; yarn deploy",
"lint": "npx eslint src"
},
"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"
}
}
File renamed without changes.
File renamed without changes.
2,923 changes: 2,923 additions & 0 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 9f0854c

Please sign in to comment.