Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 12dd0cc
Showing
12 changed files
with
17,321 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "vue-vs-react" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# created by gitignorer | ||
# profile used: node | ||
*.sw* | ||
.DS_Store | ||
node_modules | ||
npm-debug.log* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Welcome to Firebase Hosting</title> | ||
|
||
<!-- update the version number as needed --> | ||
<script defer src="/__/firebase/4.13.0/firebase-app.js"></script> | ||
<!-- include only the Firebase features as you need --> | ||
<script defer src="/__/firebase/4.13.0/firebase-auth.js"></script> | ||
<script defer src="/__/firebase/4.13.0/firebase-database.js"></script> | ||
<script defer src="/__/firebase/4.13.0/firebase-messaging.js"></script> | ||
<script defer src="/__/firebase/4.13.0/firebase-storage.js"></script> | ||
<!-- initialize the SDK after all desired features are loaded --> | ||
<script defer src="/__/firebase/init.js"></script> | ||
|
||
<style media="screen"> | ||
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; } | ||
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px; border-radius: 3px; } | ||
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; } | ||
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;} | ||
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; } | ||
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; } | ||
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } | ||
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; } | ||
@media (max-width: 600px) { | ||
body, #message { margin-top: 0; background: white; box-shadow: none; } | ||
body { border-top: 16px solid #ffa100; } | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="message"> | ||
<h2>Welcome</h2> | ||
<h1>Firebase Hosting Setup Complete</h1> | ||
<p>You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!</p> | ||
<a target="_blank" href="https://firebase.google.com/docs/hosting/">Open Hosting Documentation</a> | ||
</div> | ||
<p id="load">Firebase SDK Loading…</p> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function() { | ||
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 | ||
// // The Firebase SDK is initialized and available here! | ||
// | ||
// firebase.auth().onAuthStateChanged(user => { }); | ||
// firebase.database().ref('/path/to/ref').on('value', snapshot => { }); | ||
// firebase.messaging().requestPermission().then(() => { }); | ||
// firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { }); | ||
// | ||
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 | ||
|
||
try { | ||
let app = firebase.app(); | ||
let features = ['auth', 'database', 'messaging', 'storage'].filter(feature => typeof app[feature] === 'function'); | ||
document.getElementById('load').innerHTML = `Firebase SDK loaded with ${features.join(', ')}`; | ||
} catch (e) { | ||
console.error(e); | ||
document.getElementById('load').innerHTML = 'Error loading the Firebase SDK, check the console.'; | ||
} | ||
}); | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"firestore": { | ||
"rules": "firestore.rules", | ||
"indexes": "firestore.indexes.json" | ||
}, | ||
"functions": { | ||
"predeploy": [ | ||
"npm --prefix \"$RESOURCE_DIR\" run lint" | ||
] | ||
}, | ||
"hosting": { | ||
"public": "dist", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Example: | ||
// | ||
// "indexes": [ | ||
// { | ||
// "collectionId": "widgets", | ||
// "fields": [ | ||
// { "fieldPath": "foo", "mode": "ASCENDING" }, | ||
// { "fieldPath": "bar", "mode": "DESCENDING" } | ||
// ] | ||
// } | ||
// ] | ||
"indexes": [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /{document=**} { | ||
allow read, write; | ||
} | ||
} | ||
} |
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
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 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const functions = require('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!"); | ||
// }); |
Oops, something went wrong.