├── firebase.json
├── src
├── app
│ ├── app.component.css
│ ├── components
│ │ ├── main
│ │ │ ├── main.component.css
│ │ │ ├── main.component.html
│ │ │ └── main.component.ts
│ │ ├── login
│ │ │ ├── login.component.css
│ │ │ ├── login.component.html
│ │ │ └── login.component.ts
│ │ └── register
│ │ │ ├── register.component.css
│ │ │ ├── register.component.html
│ │ │ └── register.component.ts
│ ├── app.component.html
│ ├── app.component.ts
│ ├── services
│ │ └── user.service.ts
│ ├── app-routing.module.ts
│ ├── app.module.ts
│ └── app.component.spec.ts
├── styles.css
├── favicon.ico
├── index.html
├── main.ts
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── test.ts
└── polyfills.ts
├── tsconfig.app.json
├── tsconfig.spec.json
├── tsconfig.json
├── README.md
├── package.json
├── karma.conf.js
└── angular.json
/firebase.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/src/app/app.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/components/main/main.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/components/login/login.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/components/register/register.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GarajedeIdeas/CodePills-FIREBASE-authentication/HEAD/src/favicon.ico
--------------------------------------------------------------------------------
/src/app/components/main/main.component.html:
--------------------------------------------------------------------------------
1 |
Página principal
2 |
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | title = 'Autenticacion';
10 | }
11 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Autenticacion
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts",
10 | "src/polyfills.ts"
11 | ],
12 | "include": [
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts",
12 | "src/polyfills.ts"
13 | ],
14 | "include": [
15 | "src/**/*.spec.ts",
16 | "src/**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | firebase: {
3 | projectId: 'gdi-firebase-auth',
4 | appId: '1:776626994933:web:e6c3664546d6901e8f8fbc',
5 | storageBucket: 'gdi-firebase-auth.appspot.com',
6 | apiKey: 'AIzaSyBabwcqhlQX3KY0xCrptT9liGpLuKJlzvs',
7 | authDomain: 'gdi-firebase-auth.firebaseapp.com',
8 | messagingSenderId: '776626994933',
9 | },
10 | production: true
11 | };
12 |
--------------------------------------------------------------------------------
/src/app/components/register/register.component.html:
--------------------------------------------------------------------------------
1 | Registro de usuario
2 |
--------------------------------------------------------------------------------
/src/app/components/login/login.component.html:
--------------------------------------------------------------------------------
1 | Login de usuario
2 |
13 |
--------------------------------------------------------------------------------
/src/app/components/main/main.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Router } from '@angular/router';
3 | import { UserService } from 'src/app/services/user.service';
4 |
5 | @Component({
6 | selector: 'app-main',
7 | templateUrl: './main.component.html',
8 | styleUrls: ['./main.component.css']
9 | })
10 | export class MainComponent implements OnInit {
11 |
12 | constructor(
13 | private userService: UserService,
14 | private router: Router
15 | ) { }
16 |
17 | ngOnInit(): void {
18 | }
19 |
20 | onClick() {
21 | this.userService.logout()
22 | .then(() => {
23 | this.router.navigate(['/register']);
24 | })
25 | .catch(error => console.log(error));
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/app/services/user.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Auth, createUserWithEmailAndPassword, signInWithEmailAndPassword, signOut, signInWithPopup, GoogleAuthProvider } from '@angular/fire/auth';
3 |
4 | @Injectable({
5 | providedIn: 'root'
6 | })
7 | export class UserService {
8 |
9 | constructor(private auth: Auth) { }
10 |
11 | register({ email, password }: any) {
12 | return createUserWithEmailAndPassword(this.auth, email, password);
13 | }
14 |
15 | login({ email, password }: any) {
16 | return signInWithEmailAndPassword(this.auth, email, password);
17 | }
18 |
19 | loginWithGoogle() {
20 | return signInWithPopup(this.auth, new GoogleAuthProvider());
21 | }
22 |
23 | logout() {
24 | return signOut(this.auth);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: {
11 | context(path: string, deep?: boolean, filter?: RegExp): {
12 | keys(): string[];
13 | (id: string): T;
14 | };
15 | };
16 |
17 | // First, initialize the Angular testing environment.
18 | getTestBed().initTestEnvironment(
19 | BrowserDynamicTestingModule,
20 | platformBrowserDynamicTesting(),
21 | );
22 |
23 | // Then we find all the tests.
24 | const context = require.context('./', true, /\.spec\.ts$/);
25 | // And load the modules.
26 | context.keys().map(context);
27 |
--------------------------------------------------------------------------------
/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 | import { LoginComponent } from './components/login/login.component';
4 | import { MainComponent } from './components/main/main.component';
5 | import { RegisterComponent } from './components/register/register.component';
6 | import { canActivate, redirectUnauthorizedTo } from '@angular/fire/auth-guard';
7 |
8 | const routes: Routes = [
9 | { path: '', pathMatch: 'full', redirectTo: '/main' },
10 | {
11 | path: 'main',
12 | component: MainComponent,
13 | ...canActivate(() => redirectUnauthorizedTo(['/register']))
14 | },
15 | { path: 'register', component: RegisterComponent },
16 | { path: 'login', component: LoginComponent }
17 | ];
18 |
19 | @NgModule({
20 | imports: [RouterModule.forRoot(routes)],
21 | exports: [RouterModule]
22 | })
23 | export class AppRoutingModule { }
24 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "es2017",
20 | "module": "es2020",
21 | "lib": [
22 | "es2020",
23 | "dom"
24 | ]
25 | },
26 | "angularCompilerOptions": {
27 | "enableI18nLegacyMessageIdFormat": false,
28 | "strictInjectionParameters": true,
29 | "strictInputAccessModifiers": true,
30 | "strictTemplates": true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/app/components/register/register.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { FormControl, FormGroup } from '@angular/forms';
3 | import { Router } from '@angular/router';
4 | import { UserService } from 'src/app/services/user.service';
5 |
6 | @Component({
7 | selector: 'app-register',
8 | templateUrl: './register.component.html',
9 | styleUrls: ['./register.component.css']
10 | })
11 | export class RegisterComponent implements OnInit {
12 |
13 | formReg: FormGroup;
14 |
15 | constructor(
16 | private userService: UserService,
17 | private router: Router
18 | ) {
19 | this.formReg = new FormGroup({
20 | email: new FormControl(),
21 | password: new FormControl()
22 | })
23 | }
24 |
25 | ngOnInit(): void {
26 | }
27 |
28 | onSubmit() {
29 | this.userService.register(this.formReg.value)
30 | .then(response => {
31 | console.log(response);
32 | this.router.navigate(['/login']);
33 | })
34 | .catch(error => console.log(error));
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | firebase: {
7 | projectId: 'gdi-firebase-auth',
8 | appId: '1:776626994933:web:e6c3664546d6901e8f8fbc',
9 | storageBucket: 'gdi-firebase-auth.appspot.com',
10 | apiKey: 'AIzaSyBabwcqhlQX3KY0xCrptT9liGpLuKJlzvs',
11 | authDomain: 'gdi-firebase-auth.firebaseapp.com',
12 | messagingSenderId: '776626994933',
13 | },
14 | production: false
15 | };
16 |
17 | /*
18 | * For easier debugging in development mode, you can import the following file
19 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
20 | *
21 | * This import should be commented out in production mode because it will have a negative impact
22 | * on performance if an error is thrown.
23 | */
24 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
25 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 |
4 | import { AppRoutingModule } from './app-routing.module';
5 | import { AppComponent } from './app.component';
6 | import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
7 | import { MainComponent } from './components/main/main.component';
8 | import { RegisterComponent } from './components/register/register.component';
9 | import { LoginComponent } from './components/login/login.component';
10 | import { ReactiveFormsModule } from '@angular/forms';
11 | import { initializeApp,provideFirebaseApp } from '@angular/fire/app';
12 | import { environment } from '../environments/environment';
13 | import { provideAuth,getAuth } from '@angular/fire/auth';
14 |
15 | @NgModule({
16 | declarations: [
17 | AppComponent,
18 | MainComponent,
19 | RegisterComponent,
20 | LoginComponent
21 | ],
22 | imports: [
23 | BrowserModule,
24 | AppRoutingModule,
25 | NgbModule,
26 | ReactiveFormsModule,
27 | provideFirebaseApp(() => initializeApp(environment.firebase)),
28 | provideAuth(() => getAuth())
29 | ],
30 | providers: [],
31 | bootstrap: [AppComponent]
32 | })
33 | export class AppModule { }
34 |
--------------------------------------------------------------------------------
/src/app/components/login/login.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { FormControl, FormGroup } from '@angular/forms';
3 | import { Router } from '@angular/router';
4 | import { UserService } from 'src/app/services/user.service';
5 |
6 | @Component({
7 | selector: 'app-login',
8 | templateUrl: './login.component.html',
9 | styleUrls: ['./login.component.css']
10 | })
11 | export class LoginComponent implements OnInit {
12 |
13 | formLogin: FormGroup;
14 |
15 | constructor(
16 | private userService: UserService,
17 | private router: Router
18 | ) {
19 | this.formLogin = new FormGroup({
20 | email: new FormControl(),
21 | password: new FormControl()
22 | })
23 | }
24 |
25 | ngOnInit(): void {
26 | }
27 |
28 | onSubmit() {
29 | this.userService.login(this.formLogin.value)
30 | .then(response => {
31 | console.log(response);
32 | })
33 | .catch(error => console.log(error));
34 | }
35 |
36 | onClick() {
37 | this.userService.loginWithGoogle()
38 | .then(response => {
39 | console.log(response);
40 | this.router.navigate(['/main']);
41 | })
42 | .catch(error => console.log(error))
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 | import { RouterTestingModule } from '@angular/router/testing';
3 | import { AppComponent } from './app.component';
4 |
5 | describe('AppComponent', () => {
6 | beforeEach(async () => {
7 | await TestBed.configureTestingModule({
8 | imports: [
9 | RouterTestingModule
10 | ],
11 | declarations: [
12 | AppComponent
13 | ],
14 | }).compileComponents();
15 | });
16 |
17 | it('should create the app', () => {
18 | const fixture = TestBed.createComponent(AppComponent);
19 | const app = fixture.componentInstance;
20 | expect(app).toBeTruthy();
21 | });
22 |
23 | it(`should have as title 'Autenticacion'`, () => {
24 | const fixture = TestBed.createComponent(AppComponent);
25 | const app = fixture.componentInstance;
26 | expect(app.title).toEqual('Autenticacion');
27 | });
28 |
29 | it('should render title', () => {
30 | const fixture = TestBed.createComponent(AppComponent);
31 | fixture.detectChanges();
32 | const compiled = fixture.nativeElement as HTMLElement;
33 | expect(compiled.querySelector('.content span')?.textContent).toContain('Autenticacion app is running!');
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Webinar Youtube
2 | Cómo crear un Login con Firebase en Angular paso a paso
3 |
4 | ## Curso completo
5 | [AQUÍ](https://youtu.be/8VTxuIvMTlc)
6 |
7 | # Autenticacion
8 |
9 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.3.
10 |
11 | ## Development server
12 |
13 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
14 |
15 | ## Code scaffolding
16 |
17 | 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`.
18 |
19 | ## Build
20 |
21 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
22 |
23 | ## Running unit tests
24 |
25 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
26 |
27 | ## Running end-to-end tests
28 |
29 | 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.
30 |
31 | ## Further help
32 |
33 | 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.
34 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autenticacion",
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": "~13.0.0",
14 | "@angular/common": "~13.0.0",
15 | "@angular/compiler": "~13.0.0",
16 | "@angular/core": "~13.0.0",
17 | "@angular/fire": "^7.3.0",
18 | "@angular/forms": "~13.0.0",
19 | "@angular/localize": "~13.0.0",
20 | "@angular/platform-browser": "~13.0.0",
21 | "@angular/platform-browser-dynamic": "~13.0.0",
22 | "@angular/router": "~13.0.0",
23 | "@ng-bootstrap/ng-bootstrap": "^12.0.2",
24 | "@popperjs/core": "^2.10.2",
25 | "bootstrap": "^5.1.3",
26 | "rxjs": "~7.4.0",
27 | "tslib": "^2.3.0",
28 | "zone.js": "~0.11.4"
29 | },
30 | "devDependencies": {
31 | "@angular-devkit/build-angular": "~13.0.3",
32 | "@angular/cli": "~13.0.3",
33 | "@angular/compiler-cli": "~13.0.0",
34 | "@types/jasmine": "~3.10.0",
35 | "@types/node": "^12.11.1",
36 | "jasmine-core": "~3.10.0",
37 | "karma": "~6.3.0",
38 | "karma-chrome-launcher": "~3.1.0",
39 | "karma-coverage": "~2.0.3",
40 | "karma-jasmine": "~4.0.0",
41 | "karma-jasmine-html-reporter": "~1.7.0",
42 | "typescript": "~4.4.3"
43 | }
44 | }
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | jasmine: {
17 | // you can add configuration options for Jasmine here
18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19 | // for example, you can disable the random execution with `random: false`
20 | // or set a specific seed with `seed: 4321`
21 | },
22 | clearContext: false // leave Jasmine Spec Runner output visible in browser
23 | },
24 | jasmineHtmlReporter: {
25 | suppressAll: true // removes the duplicated traces
26 | },
27 | coverageReporter: {
28 | dir: require('path').join(__dirname, './coverage/Autenticacion'),
29 | subdir: '.',
30 | reporters: [
31 | { type: 'html' },
32 | { type: 'text-summary' }
33 | ]
34 | },
35 | reporters: ['progress', 'kjhtml'],
36 | port: 9876,
37 | colors: true,
38 | logLevel: config.LOG_INFO,
39 | autoWatch: true,
40 | browsers: ['Chrome'],
41 | singleRun: false,
42 | restartOnFileChange: true
43 | });
44 | };
45 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
3 | */
4 | import '@angular/localize/init';
5 | /**
6 | * This file includes polyfills needed by Angular and is loaded before the app.
7 | * You can add your own extra polyfills to this file.
8 | *
9 | * This file is divided into 2 sections:
10 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
11 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
12 | * file.
13 | *
14 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
15 | * automatically update themselves. This includes recent versions of Safari, Chrome (including
16 | * Opera), Edge on the desktop, and iOS and Chrome on mobile.
17 | *
18 | * Learn more in https://angular.io/guide/browser-support
19 | */
20 |
21 | /***************************************************************************************************
22 | * BROWSER POLYFILLS
23 | */
24 |
25 | /**
26 | * By default, zone.js will patch all possible macroTask and DomEvents
27 | * user can disable parts of macroTask/DomEvents patch by setting following flags
28 | * because those flags need to be set before `zone.js` being loaded, and webpack
29 | * will put import in the top of bundle, so user need to create a separate file
30 | * in this directory (for example: zone-flags.ts), and put the following flags
31 | * into that file, and then add the following code before importing zone.js.
32 | * import './zone-flags';
33 | *
34 | * The flags allowed in zone-flags.ts are listed here.
35 | *
36 | * The following flags will work for all browsers.
37 | *
38 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
39 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
40 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
41 | *
42 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
43 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
44 | *
45 | * (window as any).__Zone_enable_cross_context_check = true;
46 | *
47 | */
48 |
49 | /***************************************************************************************************
50 | * Zone JS is required by default for Angular itself.
51 | */
52 | import 'zone.js'; // Included with Angular CLI.
53 |
54 |
55 | /***************************************************************************************************
56 | * APPLICATION IMPORTS
57 | */
58 |
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "Autenticacion": {
7 | "projectType": "application",
8 | "schematics": {
9 | "@schematics/angular:application": {
10 | "strict": true
11 | }
12 | },
13 | "root": "",
14 | "sourceRoot": "src",
15 | "prefix": "app",
16 | "architect": {
17 | "build": {
18 | "builder": "@angular-devkit/build-angular:browser",
19 | "options": {
20 | "outputPath": "dist/Autenticacion",
21 | "index": "src/index.html",
22 | "main": "src/main.ts",
23 | "polyfills": "src/polyfills.ts",
24 | "tsConfig": "tsconfig.app.json",
25 | "assets": [
26 | "src/favicon.ico",
27 | "src/assets"
28 | ],
29 | "styles": [
30 | "node_modules/bootstrap/dist/css/bootstrap.min.css",
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 | "fileReplacements": [
50 | {
51 | "replace": "src/environments/environment.ts",
52 | "with": "src/environments/environment.prod.ts"
53 | }
54 | ],
55 | "outputHashing": "all"
56 | },
57 | "development": {
58 | "buildOptimizer": false,
59 | "optimization": false,
60 | "vendorChunk": true,
61 | "extractLicenses": false,
62 | "sourceMap": true,
63 | "namedChunks": true
64 | }
65 | },
66 | "defaultConfiguration": "production"
67 | },
68 | "serve": {
69 | "builder": "@angular-devkit/build-angular:dev-server",
70 | "configurations": {
71 | "production": {
72 | "browserTarget": "Autenticacion:build:production"
73 | },
74 | "development": {
75 | "browserTarget": "Autenticacion:build:development"
76 | }
77 | },
78 | "defaultConfiguration": "development"
79 | },
80 | "extract-i18n": {
81 | "builder": "@angular-devkit/build-angular:extract-i18n",
82 | "options": {
83 | "browserTarget": "Autenticacion:build"
84 | }
85 | },
86 | "test": {
87 | "builder": "@angular-devkit/build-angular:karma",
88 | "options": {
89 | "main": "src/test.ts",
90 | "polyfills": "src/polyfills.ts",
91 | "tsConfig": "tsconfig.spec.json",
92 | "karmaConfig": "karma.conf.js",
93 | "assets": [
94 | "src/favicon.ico",
95 | "src/assets"
96 | ],
97 | "styles": [
98 | "src/styles.css"
99 | ],
100 | "scripts": []
101 | }
102 | }
103 | }
104 | }
105 | },
106 | "defaultProject": "Autenticacion"
107 | }
108 |
--------------------------------------------------------------------------------