Skip to content

Commit c02c41a

Browse files
authored
challenge 53 big signal performance (tomalaforge#904)
* feat: challenge 52 big signal performance * fix: update to 53
1 parent ecc7c8d commit c02c41a

28 files changed

+453
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you would like to propose a challenge, this project is open source, so feel f
2424
2525
## Challenges
2626

27-
Check [all 52 challenges](https://angular-challenges.vercel.app/)
27+
Check [all 53 challenges](https://angular-challenges.vercel.app/)
2828

2929
## Contributors ✨
3030

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": ["../../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"plugin:@nx/angular",
9+
"plugin:@angular-eslint/template/process-inline-templates"
10+
],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.html"],
15+
"extends": ["plugin:@nx/angular-template"],
16+
"rules": {}
17+
}
18+
]
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Big Signal Performance
2+
3+
> author: thomas-laforge
4+
5+
### Run Application
6+
7+
```bash
8+
npx nx serve signal-big-signal-performance
9+
```
10+
11+
### Documentation and Instruction
12+
13+
Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/signal/52-big-signal-performance/).
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "signal-big-signal-performance",
3+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"prefix": "app",
6+
"sourceRoot": "apps/signal/53-big-signal-performance/src",
7+
"tags": [],
8+
"targets": {
9+
"build": {
10+
"executor": "@angular-devkit/build-angular:application",
11+
"outputs": ["{options.outputPath}"],
12+
"options": {
13+
"outputPath": "dist/apps/signal/53-big-signal-performance",
14+
"index": "apps/signal/53-big-signal-performance/src/index.html",
15+
"browser": "apps/signal/53-big-signal-performance/src/main.ts",
16+
"polyfills": ["zone.js"],
17+
"tsConfig": "apps/signal/53-big-signal-performance/tsconfig.app.json",
18+
"inlineStyleLanguage": "scss",
19+
"assets": [
20+
"apps/signal/53-big-signal-performance/src/favicon.ico",
21+
"apps/signal/53-big-signal-performance/src/assets"
22+
],
23+
"styles": ["apps/signal/53-big-signal-performance/src/styles.scss"],
24+
"scripts": []
25+
},
26+
"configurations": {
27+
"production": {
28+
"budgets": [
29+
{
30+
"type": "initial",
31+
"maximumWarning": "500kb",
32+
"maximumError": "1mb"
33+
},
34+
{
35+
"type": "anyComponentStyle",
36+
"maximumWarning": "2kb",
37+
"maximumError": "4kb"
38+
}
39+
],
40+
"outputHashing": "all"
41+
},
42+
"development": {
43+
"optimization": false,
44+
"extractLicenses": false,
45+
"sourceMap": true
46+
}
47+
},
48+
"defaultConfiguration": "production"
49+
},
50+
"serve": {
51+
"executor": "@angular-devkit/build-angular:dev-server",
52+
"configurations": {
53+
"production": {
54+
"buildTarget": "signal-big-signal-performance:build:production"
55+
},
56+
"development": {
57+
"buildTarget": "signal-big-signal-performance:build:development"
58+
}
59+
},
60+
"defaultConfiguration": "development"
61+
},
62+
"extract-i18n": {
63+
"executor": "@angular-devkit/build-angular:extract-i18n",
64+
"options": {
65+
"buildTarget": "signal-big-signal-performance:build"
66+
}
67+
},
68+
"lint": {
69+
"executor": "@nx/eslint:lint"
70+
}
71+
}
72+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { CDFlashingDirective } from '@angular-challenges/shared/directives';
2+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
3+
import { UserStore } from './user.service';
4+
5+
@Component({
6+
selector: 'address-user',
7+
standalone: true,
8+
template: `
9+
<div cd-flash class="m-4 block border border-gray-500 p-4">
10+
Address:
11+
<div>Street: {{ userService.user().address.street }}</div>
12+
<div>ZipCode: {{ userService.user().address.zipCode }}</div>
13+
<div>City: {{ userService.user().address.city }}</div>
14+
</div>
15+
`,
16+
changeDetection: ChangeDetectionStrategy.OnPush,
17+
imports: [CDFlashingDirective],
18+
})
19+
export class AddressComponent {
20+
userService = inject(UserStore);
21+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Component } from '@angular/core';
2+
import { AddressComponent } from './address.component';
3+
import { JobComponent } from './job.component';
4+
import { NameComponent } from './name.component';
5+
import { NoteComponent } from './note.component';
6+
import { UserFormComponent } from './user-form.component';
7+
8+
@Component({
9+
standalone: true,
10+
selector: 'app-root',
11+
template: `
12+
<name />
13+
<address-user />
14+
<job />
15+
<note />
16+
<user-form />
17+
`,
18+
styles: [''],
19+
imports: [
20+
JobComponent,
21+
NameComponent,
22+
AddressComponent,
23+
NoteComponent,
24+
UserFormComponent,
25+
],
26+
})
27+
export class AppComponent {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
3+
export const appConfig: ApplicationConfig = {
4+
providers: [],
5+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { CDFlashingDirective } from '@angular-challenges/shared/directives';
2+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
3+
import { UserStore } from './user.service';
4+
5+
@Component({
6+
selector: 'job',
7+
standalone: true,
8+
template: `
9+
<div cd-flash class="m-4 block border border-gray-500 p-4">
10+
Job:
11+
<div>title: {{ userService.user().title }}</div>
12+
<div>salary: {{ userService.user().salary }}</div>
13+
</div>
14+
`,
15+
changeDetection: ChangeDetectionStrategy.OnPush,
16+
imports: [CDFlashingDirective],
17+
})
18+
export class JobComponent {
19+
userService = inject(UserStore);
20+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { CDFlashingDirective } from '@angular-challenges/shared/directives';
2+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
3+
import { UserStore } from './user.service';
4+
5+
@Component({
6+
selector: 'name',
7+
standalone: true,
8+
template: `
9+
<div cd-flash class="m-4 block border border-gray-500 p-4">
10+
Name: {{ userService.user().name }}
11+
</div>
12+
`,
13+
changeDetection: ChangeDetectionStrategy.OnPush,
14+
imports: [CDFlashingDirective],
15+
})
16+
export class NameComponent {
17+
userService = inject(UserStore);
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { CDFlashingDirective } from '@angular-challenges/shared/directives';
2+
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
3+
import { UserStore } from './user.service';
4+
5+
@Component({
6+
selector: 'note',
7+
standalone: true,
8+
template: `
9+
<div cd-flash class="m-4 block border border-gray-500 p-4">
10+
Note: {{ userService.user().note }}
11+
</div>
12+
`,
13+
changeDetection: ChangeDetectionStrategy.OnPush,
14+
imports: [CDFlashingDirective],
15+
})
16+
export class NoteComponent {
17+
userService = inject(UserStore);
18+
}

0 commit comments

Comments
 (0)