Added firebase
This commit is contained in:
parent
214b590e8b
commit
a0951f8242
@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
- run:
|
||||
name: Build
|
||||
command: yarn build -c ${CIRCLE_BRANCH}
|
||||
command: yarn build
|
||||
|
||||
- persist_to_workspace:
|
||||
root: ./
|
||||
@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
deploy:
|
||||
docker:
|
||||
- image: google/cloud-sdk:latest
|
||||
- image: circleci/node:10.4-browsers
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
@ -48,15 +48,9 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: ./
|
||||
|
||||
- run:
|
||||
name: Authenticate GCP
|
||||
command: |
|
||||
echo $GCLOUD_SERVICE_KEY > key.json
|
||||
gcloud auth activate-service-account --key-file key.json
|
||||
|
||||
- run:
|
||||
name: Deploy
|
||||
command: gsutil cp -r dist/ZaksCode/* gs://www.zakscode.com
|
||||
command: yarn firebase deploy --token "${FIREBASE_TOKEN}"
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
5
.firebaserc
Normal file
5
.firebaserc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"projects": {
|
||||
"default": "zaks-code"
|
||||
}
|
||||
}
|
24
angular.json
24
angular.json
@ -29,30 +29,6 @@
|
||||
"es5BrowserSupport": true
|
||||
},
|
||||
"configurations": {
|
||||
"master": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.staging.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": true,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": false,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
|
23
firebase.json
Normal file
23
firebase.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"firestore": {
|
||||
"rules": "firestore.rules",
|
||||
"indexes": "firestore.indexes.json"
|
||||
},
|
||||
"hosting": {
|
||||
"public": "dist/ZaksCode",
|
||||
"ignore": [
|
||||
"firebase.json",
|
||||
"**/.*",
|
||||
"**/node_modules/**"
|
||||
],
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "**",
|
||||
"destination": "/index.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"rules": "storage.rules"
|
||||
}
|
||||
}
|
4
firestore.indexes.json
Normal file
4
firestore.indexes.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"indexes": [],
|
||||
"fieldOverrides": []
|
||||
}
|
8
firestore.rules
Normal file
8
firestore.rules
Normal file
@ -0,0 +1,8 @@
|
||||
service cloud.firestore {
|
||||
match /databases/{database}/documents {
|
||||
match /{document=**} {
|
||||
allow read;
|
||||
allow write: if request.auth != null;
|
||||
}
|
||||
}
|
||||
}
|
101
package.json
101
package.json
@ -1,51 +1,54 @@
|
||||
{
|
||||
"name": "zaks-code",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~7.2.0",
|
||||
"@angular/cdk": "~7.3.7",
|
||||
"@angular/common": "~7.2.0",
|
||||
"@angular/compiler": "~7.2.0",
|
||||
"@angular/core": "~7.2.0",
|
||||
"@angular/forms": "~7.2.0",
|
||||
"@angular/material": "^7.3.7",
|
||||
"@angular/platform-browser": "~7.2.0",
|
||||
"@angular/platform-browser-dynamic": "~7.2.0",
|
||||
"@angular/router": "~7.2.0",
|
||||
"core-js": "^2.5.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
"rxjs": "~6.3.3",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "~0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.13.0",
|
||||
"@angular/cli": "~7.3.8",
|
||||
"@angular/compiler-cli": "~7.2.0",
|
||||
"@angular/language-service": "~7.2.0",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "~4.5.0",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.0.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~1.1.2",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.11.0",
|
||||
"typescript": "~3.2.2"
|
||||
}
|
||||
"name": "zaks-code",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~7.2.0",
|
||||
"@angular/cdk": "~7.3.7",
|
||||
"@angular/common": "~7.2.0",
|
||||
"@angular/compiler": "~7.2.0",
|
||||
"@angular/core": "~7.2.0",
|
||||
"@angular/fire": "~5.1.2",
|
||||
"@angular/forms": "~7.2.0",
|
||||
"@angular/material": "^7.3.7",
|
||||
"@angular/platform-browser": "~7.2.0",
|
||||
"@angular/platform-browser-dynamic": "~7.2.0",
|
||||
"@angular/router": "~7.2.0",
|
||||
"core-js": "^2.5.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
"firebase": "^5.1.0",
|
||||
"firebase-tools": "^6.0.1",
|
||||
"rxjs": "~6.3.3",
|
||||
"tslib": "^1.9.0",
|
||||
"zone.js": "~0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.13.0",
|
||||
"@angular/cli": "~7.3.8",
|
||||
"@angular/compiler-cli": "~7.2.0",
|
||||
"@angular/language-service": "~7.2.0",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "~4.5.0",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.0.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~1.1.2",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.4.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~5.11.0",
|
||||
"typescript": "~3.2.2"
|
||||
}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {AngularFireModule} from '@angular/fire';
|
||||
import {AngularFirestoreModule} from '@angular/fire/firestore';
|
||||
|
||||
import {AppComponent} from './app.component';
|
||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||
@ -7,6 +9,7 @@ import {MaterialModule} from './material.module';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {TypewriterComponent} from './components/typewriter/typewriter.component';
|
||||
import {SlideShowComponent} from './components/slideShow/slideShow.component';
|
||||
import {environment} from '../environments/environment';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -15,6 +18,8 @@ import {SlideShowComponent} from './components/slideShow/slideShow.component';
|
||||
TypewriterComponent
|
||||
],
|
||||
imports: [
|
||||
AngularFireModule.initializeApp(environment.firebase),
|
||||
AngularFirestoreModule,
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
FormsModule,
|
||||
@ -23,5 +28,4 @@ import {SlideShowComponent} from './components/slideShow/slideShow.component';
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule {
|
||||
}
|
||||
export class AppModule { }
|
||||
|
@ -1,3 +1,11 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
production: true,
|
||||
firebase: {
|
||||
apiKey: "AIzaSyC1vKmDDzRR85DnOowPZvAkZEyzJ1EmjGI",
|
||||
authDomain: "zaks-code.firebaseapp.com",
|
||||
databaseURL: "https://zaks-code.firebaseio.com",
|
||||
projectId: "zaks-code",
|
||||
storageBucket: "zaks-code.appspot.com",
|
||||
messagingSenderId: "430075133237"
|
||||
}
|
||||
};
|
||||
|
@ -1,16 +0,0 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
@ -1,16 +1,11 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
production: false,
|
||||
firebase: {
|
||||
apiKey: 'AIzaSyC1vKmDDzRR85DnOowPZvAkZEyzJ1EmjGI',
|
||||
authDomain: 'zaks-code.firebaseapp.com',
|
||||
databaseURL: 'https://zaks-code.firebaseio.com',
|
||||
projectId: 'zaks-code',
|
||||
storageBucket: 'zaks-code.appspot.com',
|
||||
messagingSenderId: '430075133237'
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
|
8
storage.rules
Normal file
8
storage.rules
Normal file
@ -0,0 +1,8 @@
|
||||
service firebase.storage {
|
||||
match /b/{bucket}/o {
|
||||
match /{allPaths=**} {
|
||||
allow read;
|
||||
allow write: if request.auth != null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user