Skip to content

Commit 3c7f80a

Browse files
authored
Merge pull request #731 from firebase/angularfire-start
feat: add angularfire
2 parents 50656fb + 7bb8f70 commit 3c7f80a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1909
-9
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ web/functions/node_modules
1010
web-start/functions/node_modules
1111
cloud-functions-start/functions/node_modules
1212
cloud-functions/functions/node_modules
13+
angularfire-start/functions/node_modules
14+
angularfire-start/.angular
15+
angularfire-start/.vscode
16+
angularfire-start/.firebase
1317
.firebaserc
1418
firebase-debug.log
1519
.firebase

angularfire-start/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

angularfire-start/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Friendlychat
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.4.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

angularfire-start/angular.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"cli": {
5+
"packageManager": "npm"
6+
},
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"friendlychat": {
10+
"projectType": "application",
11+
"schematics": {},
12+
"root": "",
13+
"sourceRoot": "src",
14+
"prefix": "app",
15+
"architect": {
16+
"build": {
17+
"builder": "@angular-devkit/build-angular:browser",
18+
"options": {
19+
"outputPath": "dist/friendlychat",
20+
"index": "src/index.html",
21+
"main": "src/main.ts",
22+
"polyfills": [
23+
"zone.js"
24+
],
25+
"tsConfig": "tsconfig.app.json",
26+
"assets": [
27+
"src/favicon.ico",
28+
"src/assets"
29+
],
30+
"styles": [
31+
"src/styles.css"
32+
],
33+
"scripts": []
34+
},
35+
"configurations": {
36+
"production": {
37+
"budgets": [
38+
{
39+
"type": "initial",
40+
"maximumWarning": "500kb",
41+
"maximumError": "1mb"
42+
},
43+
{
44+
"type": "anyComponentStyle",
45+
"maximumWarning": "2kb",
46+
"maximumError": "4kb"
47+
}
48+
],
49+
"outputHashing": "all"
50+
},
51+
"development": {
52+
"buildOptimizer": false,
53+
"optimization": false,
54+
"vendorChunk": true,
55+
"extractLicenses": false,
56+
"sourceMap": true,
57+
"namedChunks": true
58+
}
59+
},
60+
"defaultConfiguration": "production"
61+
},
62+
"serve": {
63+
"builder": "@angular-devkit/build-angular:dev-server",
64+
"configurations": {
65+
"production": {
66+
"browserTarget": "friendlychat:build:production"
67+
},
68+
"development": {
69+
"browserTarget": "friendlychat:build:development"
70+
}
71+
},
72+
"defaultConfiguration": "development"
73+
},
74+
"extract-i18n": {
75+
"builder": "@angular-devkit/build-angular:extract-i18n",
76+
"options": {
77+
"browserTarget": "friendlychat:build"
78+
}
79+
},
80+
"test": {
81+
"builder": "@angular-devkit/build-angular:karma",
82+
"options": {
83+
"polyfills": [
84+
"zone.js",
85+
"zone.js/testing"
86+
],
87+
"tsConfig": "tsconfig.spec.json",
88+
"assets": [
89+
"src/favicon.ico",
90+
"src/assets"
91+
],
92+
"styles": [
93+
"src/styles.css"
94+
],
95+
"scripts": []
96+
}
97+
},
98+
"deploy": {
99+
"builder": "@angular/fire:deploy",
100+
"options": {
101+
"version": 2,
102+
"browserTarget": "friendlychat:build:production"
103+
}
104+
}
105+
}
106+
}
107+
}
108+
}

angularfire-start/firebase.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"firestore": {
3+
"rules": "firestore.rules",
4+
"indexes": "firestore.indexes.json"
5+
},
6+
"hosting": [
7+
{
8+
"source": ".",
9+
"ignore": [
10+
"firebase.json",
11+
"**/.*",
12+
"**/node_modules/**"
13+
],
14+
"frameworksBackend": {
15+
"region": "us-central1"
16+
}
17+
},
18+
{
19+
"target": "friendlychat",
20+
"source": ".",
21+
"frameworksBackend": {}
22+
}
23+
],
24+
"storage": {
25+
"rules": "storage.rules"
26+
},
27+
"emulators": {
28+
"auth": {
29+
"port": 9099
30+
},
31+
"functions": {
32+
"port": 5001
33+
},
34+
"firestore": {
35+
"port": 8080
36+
},
37+
"hosting": {
38+
"port": 5000
39+
},
40+
"storage": {
41+
"port": 9199
42+
},
43+
"ui": {
44+
"enabled": true
45+
},
46+
"singleProjectMode": true
47+
},
48+
"functions": [
49+
{
50+
"source": "functions",
51+
"codebase": "default",
52+
"ignore": [
53+
"node_modules",
54+
".git",
55+
"firebase-debug.log",
56+
"firebase-debug.*.log"
57+
],
58+
"predeploy": [
59+
"npm --prefix \"$RESOURCE_DIR\" run lint"
60+
]
61+
}
62+
]
63+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"indexes": [],
3+
"fieldOverrides": []
4+
}

angularfire-start/firestore.rules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
rules_version = '2';
2+
3+
service cloud.firestore {
4+
match /databases/{database}/documents {
5+
match /{document=**} {
6+
allow read, write;
7+
}
8+
}
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "functions",
3+
"description": "Cloud Functions for Firebase",
4+
"scripts": {
5+
"serve": "firebase emulators:start --only functions",
6+
"shell": "firebase functions:shell",
7+
"start": "npm run shell",
8+
"deploy": "firebase deploy --only functions",
9+
"logs": "firebase functions:log"
10+
},
11+
"engines": {
12+
"node": "18"
13+
},
14+
"main": "index.js",
15+
"dependencies": {
16+
"firebase-admin": "^11.8.0",
17+
"firebase-functions": "^4.3.1"
18+
},
19+
"devDependencies": {
20+
"firebase-functions-test": "^3.1.0"
21+
},
22+
"private": true
23+
}

angularfire-start/package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "friendlychat",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"watch": "ng build --watch --configuration development",
9+
"test": "ng test"
10+
},
11+
"private": true,
12+
"dependencies": {
13+
"@angular/animations": "^16.0.0",
14+
"@angular/common": "^16.0.0",
15+
"@angular/compiler": "^16.0.0",
16+
"@angular/core": "^16.0.0",
17+
"@angular/fire": "^7.6.1",
18+
"@angular/forms": "^16.0.0",
19+
"@angular/platform-browser": "^16.0.0",
20+
"@angular/platform-browser-dynamic": "^16.0.0",
21+
"@angular/router": "^16.0.0",
22+
"rxjs": "~7.8.0",
23+
"tslib": "^2.3.0",
24+
"zone.js": "~0.13.0"
25+
},
26+
"devDependencies": {
27+
"@angular-devkit/build-angular": "^16.0.4",
28+
"@angular/cli": "~16.0.4",
29+
"@angular/compiler-cli": "^16.0.0",
30+
"@types/jasmine": "~4.3.0",
31+
"autoprefixer": "^10.4.14",
32+
"jasmine-core": "~4.6.0",
33+
"karma": "~6.4.0",
34+
"karma-chrome-launcher": "~3.2.0",
35+
"karma-coverage": "~2.2.0",
36+
"karma-jasmine": "~5.1.0",
37+
"karma-jasmine-html-reporter": "~2.0.0",
38+
"postcss": "^8.4.24",
39+
"tailwindcss": "^3.3.2",
40+
"typescript": "~5.0.2"
41+
}
42+
}

0 commit comments

Comments
 (0)