Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Firestore functionality #273

Merged
merged 2 commits into from
Oct 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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>