Skip to content

Commit

Permalink
Merge pull request #273 from Scarygami/master
Browse files Browse the repository at this point in the history
Prepare Firestore functionality
  • Loading branch information
tjmonsi authored Oct 4, 2017
2 parents d02045e + f55ce32 commit 26fa71d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"polymer": "Polymer/polymer#1.9 - 2",
"firebase": "^4.1.1",
"firebase": "^4.5.0",
"app-storage": "PolymerElements/app-storage#1 - 2"
},
"devDependencies": {
Expand All @@ -33,7 +33,7 @@
"1.x": {
"dependencies": {
"polymer": "Polymer/polymer#^1.9",
"firebase": "^4.1.1",
"firebase": "^4.5.0",
"app-storage": "PolymerElements/app-storage#^0.9.0"
},
"devDependencies": {
Expand Down
17 changes: 15 additions & 2 deletions firebase-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<link rel="import" href="firebase-auth-script.html">
<link rel="import" href="firebase-storage-script.html">
<link rel="import" href="firebase-messaging-script.html">
<link rel="import" href="firebase-firestore-script.html">
<dom-module id="firebase-app">
<script>
(function() {
Expand Down Expand Up @@ -95,6 +96,17 @@
value: null
},

/**
* The Google Cloud Project ID for your project. You can find this
* in the Firebase Console under "Web Setup".
*
* For example: `polymerfire-test`
*/
projectId: {
type: String,
value: null
},

/**
* The Firebase app object constructed from the other fields of
* this element.
Expand All @@ -103,16 +115,17 @@
app: {
type: Object,
notify: true,
computed: '__computeApp(name, apiKey, authDomain, databaseUrl, storageBucket, messagingSenderId)'
computed: '__computeApp(name, apiKey, authDomain, databaseUrl, storageBucket, messagingSenderId, projectId)'
}
},

__computeApp: function(name, apiKey, authDomain, databaseUrl, storageBucket, messagingSenderId) {
__computeApp: function(name, apiKey, authDomain, databaseUrl, storageBucket, messagingSenderId, projectId) {
if (apiKey && authDomain && databaseUrl) {
var init = [{
apiKey: apiKey,
authDomain: authDomain,
databaseURL: databaseUrl,
projectId: projectId,
storageBucket: storageBucket,
messagingSenderId: messagingSenderId
}];
Expand Down
1 change: 1 addition & 0 deletions firebase-firestore-script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="../firebase/firebase-firestore.js"></script>

0 comments on commit 26fa71d

Please sign in to comment.