Skip to content

Commit

Permalink
Add sample data, simplify Firebase files
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelyfan committed Jul 16, 2021
1 parent f5fc53e commit 17e6eea
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 28 deletions.
9 changes: 0 additions & 9 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"targets": {
"gt-recycling": {
"hosting": {
"recycling-frontend": [
"gt-recycling"
]
}
}
},
"projects": {
"default": "gt-recycling"
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ To run locally for development:
1. Go back to the project root directory and run `npm start`
1. This will start a local development instance. In a web browser, navigate to http://localhost:4200/ to view
1. This also starts the [Firebase emulators](https://firebase.google.com/docs/emulator-suite). The website mostly uses emulated resources during development instead of production data.
1. Some sample data is automatically imported for testing purposes.
1. Firestore and Functions are emulated. Authentication uses production auth data, and is not emulated due to lack of need.
1. Firestore Rules are not emulated, so be mindful when testing new changes.
1. If you need the emulated database to contain record data, there are two Functions endpoints (`seedRouteRecords` and `seedCheckinRecords`) to help you by seeding some data.
2. A Firebase Hosting version of our website is emulated, at http://localhost:5000/. It may behave unexpectedly, so use the 4200 website instead. For some reason, this can't be shut off, but we can just ignore it.

### Deploying this code

Expand Down
17 changes: 0 additions & 17 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
{
"hosting": [
{
"target": "recycling-frontend",
"public": "dist/recycling-frontend",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
],
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build-prod": "ng build --prod",
"dev": "ng serve",
"e2e": "ng e2e",
"emulate": "firebase emulators:start",
"emulate": "firebase emulators:start --import=./sample_data",
"lint": "ng lint",
"ng": "ng",
"start": "concurrently \"npm run dev\" \"npm run emulate\"",
Expand Down
8 changes: 8 additions & 0 deletions sample_data/firebase-export-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": "9.12.1",
"firestore": {
"version": "1.12.0",
"path": "firestore_export",
"metadata_file": "firestore_export/firestore_export.overall_export_metadata"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 17e6eea

Please sign in to comment.