diff --git a/apps/angular/13-highly-customizable-css/README.md b/apps/angular/13-highly-customizable-css/README.md deleted file mode 100644 index d63171ae6..000000000 --- a/apps/angular/13-highly-customizable-css/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Highly Customizable CSS - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-highly-customizable-css -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/13-styling/). diff --git a/apps/angular/13-highly-customizable-css/project.json b/apps/angular/13-highly-customizable-css/project.json deleted file mode 100644 index c20d3bb48..000000000 --- a/apps/angular/13-highly-customizable-css/project.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "angular-highly-customizable-css", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/angular/13-highly-customizable-css/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/13-highly-customizable-css", - "index": "apps/angular/13-highly-customizable-css/src/index.html", - "main": "apps/angular/13-highly-customizable-css/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/13-highly-customizable-css/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/angular/13-highly-customizable-css/src/favicon.ico", - "apps/angular/13-highly-customizable-css/src/assets" - ], - "styles": ["apps/angular/13-highly-customizable-css/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-highly-customizable-css:build:production" - }, - "development": { - "buildTarget": "angular-highly-customizable-css:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-highly-customizable-css:build" - } - } - } -} diff --git a/apps/angular/13-highly-customizable-css/src/app/page.component.ts b/apps/angular/13-highly-customizable-css/src/app/page.component.ts deleted file mode 100644 index 029ca52d2..000000000 --- a/apps/angular/13-highly-customizable-css/src/app/page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable @angular-eslint/component-selector */ -import { Component } from '@angular/core'; -import { TextStaticComponent } from './static-text.component'; -import { TextComponent } from './text.component'; - -@Component({ - selector: 'page', - imports: [TextStaticComponent, TextComponent], - template: ` - - - - This is a blue text - `, -}) -export class PageComponent {} diff --git a/apps/angular/13-highly-customizable-css/src/app/static-text.component.ts b/apps/angular/13-highly-customizable-css/src/app/static-text.component.ts deleted file mode 100644 index 703e2a538..000000000 --- a/apps/angular/13-highly-customizable-css/src/app/static-text.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable @angular-eslint/component-selector */ -import { Component, computed, input } from '@angular/core'; -import { TextComponent } from './text.component'; - -export type StaticTextType = 'normal' | 'warning' | 'error'; - -@Component({ - selector: 'static-text', - imports: [TextComponent], - template: ` - This is a static text - `, -}) -export class TextStaticComponent { - type = input('normal'); - - font = computed(() => { - switch (this.type()) { - case 'error': - return 30; - case 'warning': - return 25; - default: - return 10; - } - }); - - color = computed(() => { - switch (this.type()) { - case 'error': - return 'red'; - case 'warning': - return 'orange'; - default: - return 'black'; - } - }); -} diff --git a/apps/angular/13-highly-customizable-css/src/app/text.component.ts b/apps/angular/13-highly-customizable-css/src/app/text.component.ts deleted file mode 100644 index 07e3e6255..000000000 --- a/apps/angular/13-highly-customizable-css/src/app/text.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable @angular-eslint/component-selector */ -import { Component, input } from '@angular/core'; - -@Component({ - selector: 'text', - template: ` -

- -

- `, -}) -export class TextComponent { - font = input(10); - color = input('black'); -} diff --git a/apps/angular/13-highly-customizable-css/src/index.html b/apps/angular/13-highly-customizable-css/src/index.html deleted file mode 100644 index e4a84b456..000000000 --- a/apps/angular/13-highly-customizable-css/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-highly-customizable-css - - - - - - - - diff --git a/apps/angular/13-highly-customizable-css/src/main.ts b/apps/angular/13-highly-customizable-css/src/main.ts deleted file mode 100644 index 698b48462..000000000 --- a/apps/angular/13-highly-customizable-css/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { PageComponent } from './app/page.component'; - -bootstrapApplication(PageComponent).catch((err) => console.error(err)); diff --git a/apps/angular/32-change-detection-bug/README.md b/apps/angular/32-change-detection-bug/README.md deleted file mode 100644 index 41e533388..000000000 --- a/apps/angular/32-change-detection-bug/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Change Detection Bug - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-change-detection-bug -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/performance/32-bug-cd/). diff --git a/apps/angular/32-change-detection-bug/jest.config.ts b/apps/angular/32-change-detection-bug/jest.config.ts deleted file mode 100644 index d0412f028..000000000 --- a/apps/angular/32-change-detection-bug/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'angular-change-detection-bug', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/angular/32-change-detection-bug', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/angular/32-change-detection-bug/project.json b/apps/angular/32-change-detection-bug/project.json deleted file mode 100644 index 977b76334..000000000 --- a/apps/angular/32-change-detection-bug/project.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "angular-change-detection-bug", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/32-change-detection-bug/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/32-change-detection-bug", - "index": "apps/angular/32-change-detection-bug/src/index.html", - "main": "apps/angular/32-change-detection-bug/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/32-change-detection-bug/tsconfig.app.json", - "assets": [ - "apps/angular/32-change-detection-bug/src/favicon.ico", - "apps/angular/32-change-detection-bug/src/assets" - ], - "styles": ["apps/angular/32-change-detection-bug/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-change-detection-bug:build:production" - }, - "development": { - "buildTarget": "angular-change-detection-bug:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-change-detection-bug:build" - } - }, - "test": { - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/angular/32-change-detection-bug/src/app/app.component.ts b/apps/angular/32-change-detection-bug/src/app/app.component.ts deleted file mode 100644 index 217999c3a..000000000 --- a/apps/angular/32-change-detection-bug/src/app/app.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; - -@Component({ - imports: [RouterOutlet], - selector: 'app-root', - template: ` -

My Application

-
- -
- -
-
- `, - host: { - class: 'flex flex-col gap-2', - }, -}) -export class AppComponent {} diff --git a/apps/angular/32-change-detection-bug/src/app/app.config.ts b/apps/angular/32-change-detection-bug/src/app/app.config.ts deleted file mode 100644 index 0071d5c42..000000000 --- a/apps/angular/32-change-detection-bug/src/app/app.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { BarComponent } from './bar.component'; -import { FooComponent } from './foo.component'; -import { MainNavigationComponent } from './main-navigation.component'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideRouter([ - { - path: '', - component: MainNavigationComponent, - outlet: 'side', - }, - { - path: '', - pathMatch: 'full', - redirectTo: 'foo', - }, - { - path: 'foo', - component: FooComponent, - }, - { - path: 'bar', - component: BarComponent, - }, - ]), - ], -}; diff --git a/apps/angular/32-change-detection-bug/src/app/bar.component.ts b/apps/angular/32-change-detection-bug/src/app/bar.component.ts deleted file mode 100644 index 81981f99d..000000000 --- a/apps/angular/32-change-detection-bug/src/app/bar.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-bar', - template: ` - BarComponent - `, -}) -export class BarComponent {} diff --git a/apps/angular/32-change-detection-bug/src/app/fake.service.ts b/apps/angular/32-change-detection-bug/src/app/fake.service.ts deleted file mode 100644 index 7640edfb2..000000000 --- a/apps/angular/32-change-detection-bug/src/app/fake.service.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; -import { delay, of } from 'rxjs'; - -@Injectable({ providedIn: 'root' }) -export class FakeServiceService { - getInfoFromBackend = () => of('Client app').pipe(delay(500)); -} diff --git a/apps/angular/32-change-detection-bug/src/app/foo.component.ts b/apps/angular/32-change-detection-bug/src/app/foo.component.ts deleted file mode 100644 index 1fcb24326..000000000 --- a/apps/angular/32-change-detection-bug/src/app/foo.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-foo', - template: ` - Foo Component - `, -}) -export class FooComponent {} diff --git a/apps/angular/32-change-detection-bug/src/app/main-navigation.component.ts b/apps/angular/32-change-detection-bug/src/app/main-navigation.component.ts deleted file mode 100644 index 1a3a5e93a..000000000 --- a/apps/angular/32-change-detection-bug/src/app/main-navigation.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, inject, input } from '@angular/core'; -import { toSignal } from '@angular/core/rxjs-interop'; -import { RouterLink, RouterLinkActive } from '@angular/router'; -import { FakeServiceService } from './fake.service'; - -interface MenuItem { - path: string; - name: string; -} - -@Component({ - selector: 'app-nav', - imports: [RouterLink, RouterLinkActive], - template: ` - @for (menu of menus(); track menu.path) { - - {{ menu.name }} - - } - `, - styles: [ - ` - a.isSelected { - @apply bg-gray-600 text-white; - } - `, - ], - host: { - class: 'flex flex-col p-2 gap-2', - }, -}) -export class NavigationComponent { - menus = input.required(); -} - -@Component({ - imports: [NavigationComponent], - template: ` - @if (info() !== null) { - - } @else { - - } - `, - host: {}, -}) -export class MainNavigationComponent { - private fakeBackend = inject(FakeServiceService); - - readonly info = toSignal(this.fakeBackend.getInfoFromBackend(), { - initialValue: null, - }); - - getMenu(prop: string) { - return [ - { path: '/foo', name: `Foo ${prop}` }, - { path: '/bar', name: `Bar ${prop}` }, - ]; - } -} diff --git a/apps/angular/32-change-detection-bug/src/index.html b/apps/angular/32-change-detection-bug/src/index.html deleted file mode 100644 index 350759387..000000000 --- a/apps/angular/32-change-detection-bug/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-change-detection-bug - - - - - - - - diff --git a/apps/angular/33-decoupling-components/README.md b/apps/angular/33-decoupling-components/README.md deleted file mode 100644 index 4af70458f..000000000 --- a/apps/angular/33-decoupling-components/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Decoupling Components - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-decoupling-components -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/33-decoupling/). diff --git a/apps/angular/33-decoupling-components/project.json b/apps/angular/33-decoupling-components/project.json deleted file mode 100644 index c4140b61b..000000000 --- a/apps/angular/33-decoupling-components/project.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "angular-decoupling-components", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/33-decoupling-components/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/33-decoupling-components", - "index": "apps/angular/33-decoupling-components/src/index.html", - "main": "apps/angular/33-decoupling-components/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/33-decoupling-components/tsconfig.app.json", - "assets": [ - "apps/angular/33-decoupling-components/src/favicon.ico", - "apps/angular/33-decoupling-components/src/assets" - ], - "styles": ["apps/angular/33-decoupling-components/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-decoupling-components:build:production" - }, - "development": { - "buildTarget": "angular-decoupling-components:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-decoupling-components:build" - } - } - } -} diff --git a/apps/angular/33-decoupling-components/src/app/app.component.ts b/apps/angular/33-decoupling-components/src/app/app.component.ts deleted file mode 100644 index 0d78f4d34..000000000 --- a/apps/angular/33-decoupling-components/src/app/app.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { BtnDisabledDirective } from '@angular-challenges/decoupling/brain'; -import { BtnHelmetDirective } from '@angular-challenges/decoupling/helmet'; -import { Component } from '@angular/core'; - -@Component({ - imports: [BtnDisabledDirective, BtnHelmetDirective], - selector: 'app-root', - template: ` - - `, -}) -export class AppComponent {} diff --git a/apps/angular/33-decoupling-components/src/index.html b/apps/angular/33-decoupling-components/src/index.html deleted file mode 100644 index b946b0cfd..000000000 --- a/apps/angular/33-decoupling-components/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-decoupling-components - - - - - - - - diff --git a/apps/angular/33-decoupling-components/tsconfig.editor.json b/apps/angular/33-decoupling-components/tsconfig.editor.json deleted file mode 100644 index bff9e55cb..000000000 --- a/apps/angular/33-decoupling-components/tsconfig.editor.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [ - "src/**/*.ts", - "../../../libs/decoupling/brain/src/lib/button-disabled.directive.ts", - "../../../libs/decoupling/helmet/src/lib/btn-style.directive.ts" - ], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/angular/4-typed-context-outlet/README.md b/apps/angular/4-typed-context-outlet/README.md deleted file mode 100644 index e81915167..000000000 --- a/apps/angular/4-typed-context-outlet/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Typed ContextOutlet - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-typed-context-outlet -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/4-context-outlet-typed/). diff --git a/apps/angular/4-typed-context-outlet/project.json b/apps/angular/4-typed-context-outlet/project.json deleted file mode 100644 index 273bca97d..000000000 --- a/apps/angular/4-typed-context-outlet/project.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "angular-typed-context-outlet", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/angular/4-typed-context-outlet/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/4-typed-context-outlet", - "index": "apps/angular/4-typed-context-outlet/src/index.html", - "main": "apps/angular/4-typed-context-outlet/src/main.ts", - "polyfills": "apps/angular/4-typed-context-outlet/src/polyfills.ts", - "tsConfig": "apps/angular/4-typed-context-outlet/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/angular/4-typed-context-outlet/src/favicon.ico", - "apps/angular/4-typed-context-outlet/src/assets" - ], - "styles": ["apps/angular/4-typed-context-outlet/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-typed-context-outlet:build:production" - }, - "development": { - "buildTarget": "angular-typed-context-outlet:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-typed-context-outlet:build" - } - } - } -} diff --git a/apps/angular/4-typed-context-outlet/src/app/app.component.ts b/apps/angular/4-typed-context-outlet/src/app/app.component.ts deleted file mode 100644 index d608bec2c..000000000 --- a/apps/angular/4-typed-context-outlet/src/app/app.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { ListComponent } from './list.component'; -import { PersonComponent } from './person.component'; - -@Component({ - imports: [PersonComponent, ListComponent], - selector: 'app-root', - template: ` - - - {{ name }}: {{ age }} - - - - - - {{ student.name }}: {{ student.age }} - {{ i }} - - - - - - {{ city.name }}: {{ city.country }} - {{ i }} - - - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class AppComponent { - person = { - name: 'toto', - age: 3, - }; - - students = [ - { name: 'toto', age: 3 }, - { name: 'titi', age: 4 }, - ]; - - cities = [ - { name: 'Paris', country: 'France' }, - { name: 'Berlin', country: 'Germany' }, - ]; -} diff --git a/apps/angular/4-typed-context-outlet/src/app/list.component.ts b/apps/angular/4-typed-context-outlet/src/app/list.component.ts deleted file mode 100644 index 57fa4e361..000000000 --- a/apps/angular/4-typed-context-outlet/src/app/list.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NgTemplateOutlet } from '@angular/common'; -import { - ChangeDetectionStrategy, - Component, - contentChild, - input, - TemplateRef, -} from '@angular/core'; - -@Component({ - selector: 'list', - template: ` - @for (item of list(); track $index) { - - } - - No Template - `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NgTemplateOutlet], -}) -export class ListComponent { - list = input.required(); - - listTemplateRef = contentChild('listRef', { read: TemplateRef }); -} diff --git a/apps/angular/4-typed-context-outlet/src/app/person.component.ts b/apps/angular/4-typed-context-outlet/src/app/person.component.ts deleted file mode 100644 index d9f5e7520..000000000 --- a/apps/angular/4-typed-context-outlet/src/app/person.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgTemplateOutlet } from '@angular/common'; -import { Component, contentChild, input, TemplateRef } from '@angular/core'; - -@Component({ - imports: [NgTemplateOutlet], - selector: 'person', - template: ` - - - No Template - `, -}) -export class PersonComponent { - person = input.required<{ name: string; age: number }>(); - - personTemplateRef = contentChild('personRef', { read: TemplateRef }); -} diff --git a/apps/angular/4-typed-context-outlet/src/index.html b/apps/angular/4-typed-context-outlet/src/index.html deleted file mode 100644 index a9c0b5484..000000000 --- a/apps/angular/4-typed-context-outlet/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-typed-context-outlet - - - - - - - - diff --git a/apps/angular/44-view-transition/.eslintrc.json b/apps/angular/44-view-transition/.eslintrc.json deleted file mode 100644 index 3a7370250..000000000 --- a/apps/angular/44-view-transition/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/angular/45-react-in-angular/README.md b/apps/angular/45-react-in-angular/README.md deleted file mode 100644 index 0a8679ac4..000000000 --- a/apps/angular/45-react-in-angular/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# React in angular - -> author: wandrille-guesdon - -### Run Application - -```bash -npx nx serve angular-react-in-angular -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/45-react-in-angular/). diff --git a/apps/angular/45-react-in-angular/jest.config.ts b/apps/angular/45-react-in-angular/jest.config.ts deleted file mode 100644 index cda19a635..000000000 --- a/apps/angular/45-react-in-angular/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'angular-react-in-angular', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/angular/45-react-in-angular', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/angular/45-react-in-angular/project.json b/apps/angular/45-react-in-angular/project.json deleted file mode 100644 index 8a3bf02fc..000000000 --- a/apps/angular/45-react-in-angular/project.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "angular-react-in-angular", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/45-react-in-angular/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/45-react-in-angular", - "index": "apps/angular/45-react-in-angular/src/index.html", - "browser": "apps/angular/45-react-in-angular/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/45-react-in-angular/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/angular/45-react-in-angular/src/favicon.ico", - "apps/angular/45-react-in-angular/src/assets" - ], - "styles": ["apps/angular/45-react-in-angular/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-react-in-angular:build:production" - }, - "development": { - "buildTarget": "angular-react-in-angular:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-react-in-angular:build" - } - }, - "test": { - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/angular/45-react-in-angular/src/app/app.component.ts b/apps/angular/45-react-in-angular/src/app/app.component.ts deleted file mode 100644 index 87b9675cc..000000000 --- a/apps/angular/45-react-in-angular/src/app/app.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, signal } from '@angular/core'; -import { PostComponent } from './react/post.component'; - -type Post = { title: string; description: string }; - -@Component({ - imports: [PostComponent], - selector: 'app-root', - template: ` -
-
- @for (post of posts; track post.title) { -
- -
- } -
-
- Selected Post: - - {{ selectedPost()?.title ?? '-' }} - -
-
- `, - styles: [''], -}) -export class AppComponent { - readonly posts = [ - { - title: 'A Deep Dive into Angular', - description: - "Explore Angular's core features, its evolution, and best practices in development for creating dynamic, efficient web applications in our comprehensive guide.", - pictureLink: - 'https://images.unsplash.com/photo-1471958680802-1345a694ba6d', - }, - { - title: 'The Perfect Combination', - description: - 'Unveil the power of combining Angular & React in web development, maximizing efficiency and flexibility for building scalable, sophisticated applications.', - pictureLink: - 'https://images.unsplash.com/photo-1518717202715-9fa9d099f58a', - }, - { - title: 'Taking Angular to the Next Level', - description: - "Discover how integrating React with Angular elevates web development, blending Angular's structure with React's UI prowess for advanced applications.", - pictureLink: - 'https://images.unsplash.com/photo-1532103050105-860af53bc6aa', - }, - ]; - - readonly selectedPost = signal(null); - - selectPost(post: Post) { - this.selectedPost.set(post); - } -} diff --git a/apps/angular/45-react-in-angular/src/app/react/ReactPost.tsx b/apps/angular/45-react-in-angular/src/app/react/ReactPost.tsx deleted file mode 100644 index 3f6b9e4cd..000000000 --- a/apps/angular/45-react-in-angular/src/app/react/ReactPost.tsx +++ /dev/null @@ -1,29 +0,0 @@ -// import React from 'react'; - -export default function ReactPost(props: { - title?: string; - description?: string; - pictureLink?: string; - selected?: boolean; - handleClick: () => void; -}) { - return ( -
-
- {props.title} -
-
{props.title}
-

{props.description}

- -
-
-
- ); -} diff --git a/apps/angular/45-react-in-angular/src/app/react/post.component.ts b/apps/angular/45-react-in-angular/src/app/react/post.component.ts deleted file mode 100644 index d5eb2cedf..000000000 --- a/apps/angular/45-react-in-angular/src/app/react/post.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component, EventEmitter, input, Output } from '@angular/core'; - -type Post = { title: string; description: string; pictureLink: string }; - -@Component({ - selector: 'app-post', - template: ` -
- `, - styles: [''], -}) -export class PostComponent { - post = input(undefined); - isSelected = input(false); - @Output() selectPost = new EventEmitter(); -} diff --git a/apps/angular/45-react-in-angular/src/index.html b/apps/angular/45-react-in-angular/src/index.html deleted file mode 100644 index 9d9dd3923..000000000 --- a/apps/angular/45-react-in-angular/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-react-in-angular - - - - - - - - diff --git a/apps/angular/5-crud-application/tsconfig.spec.json b/apps/angular/5-crud-application/tsconfig.spec.json deleted file mode 100644 index b9534b857..000000000 --- a/apps/angular/5-crud-application/tsconfig.spec.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] -} diff --git a/apps/angular/55-back-button-navigation/README.md b/apps/angular/55-back-button-navigation/README.md deleted file mode 100644 index 2534d270c..000000000 --- a/apps/angular/55-back-button-navigation/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Back-Button-Navigation - -> author: ioannis-tsironis - -### Run Application - -```bash -npx nx serve angular-back-button-navigation -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/55-back-button-navigation/). diff --git a/apps/angular/55-back-button-navigation/jest.config.ts b/apps/angular/55-back-button-navigation/jest.config.ts deleted file mode 100644 index 845a03a01..000000000 --- a/apps/angular/55-back-button-navigation/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'angular-back-button-navigation', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/angular/55-back-button-navigation', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/angular/55-back-button-navigation/project.json b/apps/angular/55-back-button-navigation/project.json deleted file mode 100644 index e6c824729..000000000 --- a/apps/angular/55-back-button-navigation/project.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "angular-back-button-navigation", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/55-back-button-navigation/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/55-back-button-navigation", - "index": "apps/angular/55-back-button-navigation/src/index.html", - "browser": "apps/angular/55-back-button-navigation/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/55-back-button-navigation/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - { - "glob": "**/*", - "input": "apps/angular/55-back-button-navigation/public" - } - ], - "styles": [ - "apps/angular/55-back-button-navigation/src/styles.scss", - "node_modules/@angular/material/prebuilt-themes/indigo-pink.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-back-button-navigation:build:production" - }, - "development": { - "buildTarget": "angular-back-button-navigation:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-back-button-navigation:build" - } - }, - "test": { - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/angular/55-back-button-navigation/src/app/app.component.html b/apps/angular/55-back-button-navigation/src/app/app.component.html deleted file mode 100644 index 0680b43f9..000000000 --- a/apps/angular/55-back-button-navigation/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/apps/angular/55-back-button-navigation/src/app/app.component.ts b/apps/angular/55-back-button-navigation/src/app/app.component.ts deleted file mode 100644 index baffdae25..000000000 --- a/apps/angular/55-back-button-navigation/src/app/app.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - imports: [RouterOutlet, RouterLink], - selector: 'app-root', - templateUrl: './app.component.html', -}) -export class AppComponent {} diff --git a/apps/angular/55-back-button-navigation/src/app/app.config.ts b/apps/angular/55-back-button-navigation/src/app/app.config.ts deleted file mode 100644 index 440cdf2c3..000000000 --- a/apps/angular/55-back-button-navigation/src/app/app.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { APP_ROUTES } from './app.routes'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(APP_ROUTES), - ], -}; diff --git a/apps/angular/55-back-button-navigation/src/app/app.routes.ts b/apps/angular/55-back-button-navigation/src/app/app.routes.ts deleted file mode 100644 index 7deecd57a..000000000 --- a/apps/angular/55-back-button-navigation/src/app/app.routes.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { SensitiveActionComponent } from './sensitive-action/sensitive-action.component'; -import { SimpleActionComponent } from './simple-action/simple-action.component'; - -export const APP_ROUTES: Routes = [ - { - path: '', - pathMatch: 'full', - redirectTo: 'home', - }, - { - path: 'home', - component: HomeComponent, - }, - { - path: 'simple-action', - component: SimpleActionComponent, - }, - { - path: 'sensitive-action', - component: SensitiveActionComponent, - }, -]; diff --git a/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.html b/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.html deleted file mode 100644 index ff00ea965..000000000 --- a/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.html +++ /dev/null @@ -1,6 +0,0 @@ -

Delete file

-Would you like to delete cat.jpeg? - - - - diff --git a/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.ts b/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.ts deleted file mode 100644 index 9a9dd0fef..000000000 --- a/apps/angular/55-back-button-navigation/src/app/dialog/dialog.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { - MatDialogActions, - MatDialogClose, - MatDialogContent, - MatDialogRef, - MatDialogTitle, -} from '@angular/material/dialog'; - -@Component({ - selector: 'app-dialog-dialog', - templateUrl: './dialog.component.html', - imports: [ - MatButtonModule, - MatDialogActions, - MatDialogClose, - MatDialogTitle, - MatDialogContent, - ], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class DialogComponent { - readonly dialogRef = inject(MatDialogRef); -} diff --git a/apps/angular/55-back-button-navigation/src/app/home/home.component.html b/apps/angular/55-back-button-navigation/src/app/home/home.component.html deleted file mode 100644 index cce9e6d4f..000000000 --- a/apps/angular/55-back-button-navigation/src/app/home/home.component.html +++ /dev/null @@ -1,7 +0,0 @@ - - Go to simple dialog action page - - - - Go to sensitive dialog action page - diff --git a/apps/angular/55-back-button-navigation/src/app/home/home.component.ts b/apps/angular/55-back-button-navigation/src/app/home/home.component.ts deleted file mode 100644 index 18c4147b1..000000000 --- a/apps/angular/55-back-button-navigation/src/app/home/home.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { RouterLink } from '@angular/router'; - -@Component({ - imports: [MatButtonModule, RouterLink], - selector: 'app-home', - templateUrl: './home.component.html', -}) -export class HomeComponent {} diff --git a/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.html b/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.html deleted file mode 100644 index bcb7382e9..000000000 --- a/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.ts b/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.ts deleted file mode 100644 index a97282c33..000000000 --- a/apps/angular/55-back-button-navigation/src/app/sensitive-action/sensitive-action.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialog } from '@angular/material/dialog'; -import { DialogComponent } from '../dialog/dialog.component'; - -@Component({ - imports: [MatButtonModule], - selector: 'app-sensitive-action', - templateUrl: './sensitive-action.component.html', -}) -export class SensitiveActionComponent { - readonly #dialog = inject(MatDialog); - - openDialog(): void { - this.#dialog.open(DialogComponent, { - width: '250px', - }); - } -} diff --git a/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.html b/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.html deleted file mode 100644 index 95f63e65e..000000000 --- a/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.ts b/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.ts deleted file mode 100644 index fe97e7368..000000000 --- a/apps/angular/55-back-button-navigation/src/app/simple-action/simple-action.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialog } from '@angular/material/dialog'; -import { DialogComponent } from '../dialog/dialog.component'; - -@Component({ - imports: [MatButtonModule], - selector: 'app-simple-action', - templateUrl: './simple-action.component.html', -}) -export class SimpleActionComponent { - readonly #dialog = inject(MatDialog); - - openDialog(): void { - this.#dialog.open(DialogComponent, { - width: '250px', - }); - } -} diff --git a/apps/angular/55-back-button-navigation/src/index.html b/apps/angular/55-back-button-navigation/src/index.html deleted file mode 100644 index 4e657d614..000000000 --- a/apps/angular/55-back-button-navigation/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-back-button-navigation - - - - - - - - diff --git a/apps/angular/55-back-button-navigation/src/styles.scss b/apps/angular/55-back-button-navigation/src/styles.scss deleted file mode 100644 index acd290007..000000000 --- a/apps/angular/55-back-button-navigation/src/styles.scss +++ /dev/null @@ -1,29 +0,0 @@ -@use '@angular/material' as mat; - -/* You can add global styles to this file, and also import other style files */ - -@tailwind base; -@tailwind components; -@tailwind utilities; - -@include mat.elevation-classes(); -@include mat.app-background(); - -$theme-primary: mat.m2-define-palette(mat.$m2-indigo-palette); -$theme-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400); - -$theme-warn: mat.m2-define-palette(mat.$m2-red-palette); - -$theme: mat.m2-define-light-theme( - ( - color: ( - primary: $theme-primary, - accent: $theme-accent, - warn: $theme-warn, - ), - typography: mat.m2-define-typography-config(), - ) -); - -@include mat.dialog-theme($theme); -@include mat.button-theme($theme); diff --git a/apps/angular/55-back-button-navigation/tsconfig.spec.json b/apps/angular/55-back-button-navigation/tsconfig.spec.json deleted file mode 100644 index 1a4817a7d..000000000 --- a/apps/angular/55-back-button-navigation/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/angular/58-content-projection-condition/README.md b/apps/angular/58-content-projection-condition/README.md deleted file mode 100644 index 755bd8854..000000000 --- a/apps/angular/58-content-projection-condition/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Content Projection Condition - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-content-projection-condition -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/58-content-projection-condition/). diff --git a/apps/angular/58-content-projection-condition/project.json b/apps/angular/58-content-projection-condition/project.json deleted file mode 100644 index b268984a2..000000000 --- a/apps/angular/58-content-projection-condition/project.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "angular-content-projection-condition", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/58-content-projection-condition/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/58-content-projection-condition", - "index": "apps/angular/58-content-projection-condition/src/index.html", - "browser": "apps/angular/58-content-projection-condition/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/58-content-projection-condition/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - { - "glob": "**/*", - "input": "apps/angular/58-content-projection-condition/public" - } - ], - "styles": [ - "apps/angular/58-content-projection-condition/src/styles.scss" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kb", - "maximumError": "8kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-content-projection-condition:build:production" - }, - "development": { - "buildTarget": "angular-content-projection-condition:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-content-projection-condition:build" - } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "serve-static": { - "executor": "@nx/web:file-server", - "options": { - "buildTarget": "angular-content-projection-condition:build", - "staticFilePath": "dist/apps/angular/58-content-projection-condition/browser", - "spa": true - } - } - } -} diff --git a/apps/angular/58-content-projection-condition/src/app/app.component.ts b/apps/angular/58-content-projection-condition/src/app/app.component.ts deleted file mode 100644 index afad56f22..000000000 --- a/apps/angular/58-content-projection-condition/src/app/app.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { CardComponent } from './card.component'; - -@Component({ - imports: [CardComponent], - selector: 'app-root', - template: ` - -
Card 1
-
Message 1
-
- -
Card 2
-
Message 2
-
- `, - host: { - class: 'p-4 block flex flex-col gap-1', - }, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class AppComponent {} diff --git a/apps/angular/58-content-projection-condition/src/app/app.config.ts b/apps/angular/58-content-projection-condition/src/app/app.config.ts deleted file mode 100644 index 034603cfd..000000000 --- a/apps/angular/58-content-projection-condition/src/app/app.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; - -export const appConfig: ApplicationConfig = { - providers: [provideZoneChangeDetection({ eventCoalescing: true })], -}; diff --git a/apps/angular/58-content-projection-condition/src/app/card.component.ts b/apps/angular/58-content-projection-condition/src/app/card.component.ts deleted file mode 100644 index 46925977c..000000000 --- a/apps/angular/58-content-projection-condition/src/app/card.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ChangeDetectionStrategy, Component, input } from '@angular/core'; - -@Component({ - selector: 'app-card', - template: ` - @if (small()) { - - - } @else { -
-
- -
- -
- } - `, - changeDetection: ChangeDetectionStrategy.OnPush, - host: { - class: 'p-4 border border-grey rounded-sm flex flex-col w-[200px]', - }, -}) -export class CardComponent { - small = input(false); -} diff --git a/apps/angular/58-content-projection-condition/src/index.html b/apps/angular/58-content-projection-condition/src/index.html deleted file mode 100644 index f1768ec71..000000000 --- a/apps/angular/58-content-projection-condition/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-content-projection-condition - - - - - - - - diff --git a/apps/angular/58-content-projection-condition/tsconfig.app.json b/apps/angular/58-content-projection-condition/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/angular/58-content-projection-condition/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/angular/58-content-projection-condition/tsconfig.json b/apps/angular/58-content-projection-condition/tsconfig.json deleted file mode 100644 index 1b86db04e..000000000 --- a/apps/angular/58-content-projection-condition/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.app.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/angular/59-content-projection-defer/.eslintrc.json b/apps/angular/59-content-projection-defer/.eslintrc.json deleted file mode 100644 index 995177b5b..000000000 --- a/apps/angular/59-content-projection-defer/.eslintrc.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/component-class-suffix": "off", - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/angular/59-content-projection-defer/README.md b/apps/angular/59-content-projection-defer/README.md deleted file mode 100644 index f726842d1..000000000 --- a/apps/angular/59-content-projection-defer/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# content-projection-defer - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve angular-content-projection-defer -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/59-content-projection-defer/). diff --git a/apps/angular/59-content-projection-defer/project.json b/apps/angular/59-content-projection-defer/project.json deleted file mode 100644 index efd270b03..000000000 --- a/apps/angular/59-content-projection-defer/project.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "angular-content-projection-defer", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/angular/59-content-projection-defer/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/angular/59-content-projection-defer", - "index": "apps/angular/59-content-projection-defer/src/index.html", - "browser": "apps/angular/59-content-projection-defer/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/angular/59-content-projection-defer/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - { - "glob": "**/*", - "input": "apps/angular/59-content-projection-defer/public" - } - ], - "styles": ["apps/angular/59-content-projection-defer/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kb", - "maximumError": "8kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "angular-content-projection-defer:build:production" - }, - "development": { - "buildTarget": "angular-content-projection-defer:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular-content-projection-defer:build" - } - }, - "lint": { - "executor": "@nx/eslint:lint" - }, - "serve-static": { - "executor": "@nx/web:file-server", - "options": { - "buildTarget": "angular-content-projection-defer:build", - "staticFilePath": "dist/apps/angular/59-content-projection-defer/browser", - "spa": true - } - } - } -} diff --git a/apps/angular/59-content-projection-defer/src/app/app.component.ts b/apps/angular/59-content-projection-defer/src/app/app.component.ts deleted file mode 100644 index ae40bc880..000000000 --- a/apps/angular/59-content-projection-defer/src/app/app.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - imports: [RouterOutlet, RouterLink], - selector: 'app-root', - template: ` -
- - -
- - `, - changeDetection: ChangeDetectionStrategy.OnPush, - host: { - class: 'flex flex-col gap-2 ', - }, -}) -export class AppComponent {} diff --git a/apps/angular/59-content-projection-defer/src/app/app.config.ts b/apps/angular/59-content-projection-defer/src/app/app.config.ts deleted file mode 100644 index faf4d099a..000000000 --- a/apps/angular/59-content-projection-defer/src/app/app.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { provideHttpClient } from '@angular/common/http'; -import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { appRoutes } from './app.routes'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(appRoutes), - provideHttpClient(), - ], -}; diff --git a/apps/angular/59-content-projection-defer/src/app/app.routes.ts b/apps/angular/59-content-projection-defer/src/app/app.routes.ts deleted file mode 100644 index 3ca1b67cc..000000000 --- a/apps/angular/59-content-projection-defer/src/app/app.routes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Route } from '@angular/router'; - -export const appRoutes: Route[] = [ - { - path: 'page-1', - loadComponent: () => import('./page-1').then((m) => m.Page1), - }, - { - path: 'page-2', - loadComponent: () => import('./page-2').then((m) => m.Page2), - }, - { path: '**', redirectTo: 'page-1' }, -]; diff --git a/apps/angular/59-content-projection-defer/src/app/expandable-card.ts b/apps/angular/59-content-projection-defer/src/app/expandable-card.ts deleted file mode 100644 index 8f446ed80..000000000 --- a/apps/angular/59-content-projection-defer/src/app/expandable-card.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ChangeDetectionStrategy, Component, signal } from '@angular/core'; - -@Component({ - selector: 'app-expandable-card', - template: ` - - -
- -
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - host: { - class: 'flex flex-col gap-2 ', - }, -}) -export class ExpandableCard { - public isExpanded = signal(false); -} diff --git a/apps/angular/59-content-projection-defer/src/app/page-1.ts b/apps/angular/59-content-projection-defer/src/app/page-1.ts deleted file mode 100644 index 868d76959..000000000 --- a/apps/angular/59-content-projection-defer/src/app/page-1.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; - -@Component({ - selector: 'app-page-1', - template: ` - page1 - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class Page1 {} diff --git a/apps/angular/59-content-projection-defer/src/app/page-2.ts b/apps/angular/59-content-projection-defer/src/app/page-2.ts deleted file mode 100644 index 5665466d8..000000000 --- a/apps/angular/59-content-projection-defer/src/app/page-2.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { httpResource } from '@angular/common/http'; -import { - ChangeDetectionStrategy, - Component, - ResourceStatus, -} from '@angular/core'; -import { ExpandableCard } from './expandable-card'; - -interface Post { - id: number; - title: string; - body: string; - userId: number; -} - -@Component({ - selector: 'app-page-2', - template: ` - page2 - -
Load Post
-
- @if (postResource.isLoading()) { - Loading... - } @else if (postResource.status() === ResourceStatus.Error) { - Error... - } @else { - @for (post of postResource.value(); track post.id) { -
{{ post.title }}
- } - } -
-
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [ExpandableCard], -}) -export class Page2 { - public postResource = httpResource( - 'https://jsonplaceholder.typicode.com/posts', - ); - protected readonly ResourceStatus = ResourceStatus; -} diff --git a/apps/angular/59-content-projection-defer/src/index.html b/apps/angular/59-content-projection-defer/src/index.html deleted file mode 100644 index 79f435fa6..000000000 --- a/apps/angular/59-content-projection-defer/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - angular-content-projection-defer - - - - - - - - diff --git a/apps/angular/59-content-projection-defer/tsconfig.app.json b/apps/angular/59-content-projection-defer/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/angular/59-content-projection-defer/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/angular/59-content-projection-defer/tsconfig.json b/apps/angular/59-content-projection-defer/tsconfig.json deleted file mode 100644 index 1b86db04e..000000000 --- a/apps/angular/59-content-projection-defer/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.app.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/angular/6-structural-directive/tsconfig.app.json b/apps/angular/6-structural-directive/tsconfig.app.json deleted file mode 100644 index 2a1ca1b8d..000000000 --- a/apps/angular/6-structural-directive/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "target": "ES2022", - "useDefineForClassFields": false, - "moduleResolution": "bundler" - }, - "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] -} diff --git a/apps/angular/8-pure-pipe/tsconfig.app.json b/apps/angular/8-pure-pipe/tsconfig.app.json deleted file mode 100644 index 2a1ca1b8d..000000000 --- a/apps/angular/8-pure-pipe/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "target": "ES2022", - "useDefineForClassFields": false, - "moduleResolution": "bundler" - }, - "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] -} diff --git a/apps/angular/9-wrap-function-pipe/src/polyfills.ts b/apps/angular/9-wrap-function-pipe/src/polyfills.ts deleted file mode 100644 index e4555ed11..000000000 --- a/apps/angular/9-wrap-function-pipe/src/polyfills.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes recent versions of Safari, Chrome (including - * Opera), Edge on the desktop, and iOS and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js'; // Included with Angular CLI. - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/apps/angular/9-wrap-function-pipe/tsconfig.app.json b/apps/angular/9-wrap-function-pipe/tsconfig.app.json deleted file mode 100644 index 2a1ca1b8d..000000000 --- a/apps/angular/9-wrap-function-pipe/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "target": "ES2022", - "useDefineForClassFields": false, - "moduleResolution": "bundler" - }, - "files": ["src/main.ts", "src/polyfills.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] -} diff --git a/apps/angular/9-wrap-function-pipe/tsconfig.json b/apps/angular/9-wrap-function-pipe/tsconfig.json deleted file mode 100644 index b2dbbf22e..000000000 --- a/apps/angular/9-wrap-function-pipe/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "compilerOptions": { - "target": "es2020", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/angular/10-utility-wrapper-pipe/.eslintrc.json b/apps/animations/simple-animations/.eslintrc.json similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/.eslintrc.json rename to apps/animations/simple-animations/.eslintrc.json diff --git a/apps/angular/46-simple-animations/README.md b/apps/animations/simple-animations/README.md similarity index 100% rename from apps/angular/46-simple-animations/README.md rename to apps/animations/simple-animations/README.md diff --git a/apps/angular/46-simple-animations/jest.config.ts b/apps/animations/simple-animations/jest.config.ts similarity index 100% rename from apps/angular/46-simple-animations/jest.config.ts rename to apps/animations/simple-animations/jest.config.ts diff --git a/apps/angular/46-simple-animations/project.json b/apps/animations/simple-animations/project.json similarity index 100% rename from apps/angular/46-simple-animations/project.json rename to apps/animations/simple-animations/project.json diff --git a/apps/angular/46-simple-animations/src/app/app.component.ts b/apps/animations/simple-animations/src/app/app.component.ts similarity index 100% rename from apps/angular/46-simple-animations/src/app/app.component.ts rename to apps/animations/simple-animations/src/app/app.component.ts diff --git a/apps/angular/45-react-in-angular/src/app/app.config.ts b/apps/animations/simple-animations/src/app/app.config.ts similarity index 100% rename from apps/angular/45-react-in-angular/src/app/app.config.ts rename to apps/animations/simple-animations/src/app/app.config.ts diff --git a/apps/angular/1-projection/src/assets/.gitkeep b/apps/animations/simple-animations/src/assets/.gitkeep similarity index 100% rename from apps/angular/1-projection/src/assets/.gitkeep rename to apps/animations/simple-animations/src/assets/.gitkeep diff --git a/apps/angular/1-projection/src/favicon.ico b/apps/animations/simple-animations/src/favicon.ico similarity index 100% rename from apps/angular/1-projection/src/favicon.ico rename to apps/animations/simple-animations/src/favicon.ico diff --git a/apps/angular/46-simple-animations/src/index.html b/apps/animations/simple-animations/src/index.html similarity index 100% rename from apps/angular/46-simple-animations/src/index.html rename to apps/animations/simple-animations/src/index.html diff --git a/apps/angular/22-router-input/src/main.ts b/apps/animations/simple-animations/src/main.ts similarity index 100% rename from apps/angular/22-router-input/src/main.ts rename to apps/animations/simple-animations/src/main.ts diff --git a/apps/angular/21-anchor-navigation/src/styles.scss b/apps/animations/simple-animations/src/styles.scss similarity index 100% rename from apps/angular/21-anchor-navigation/src/styles.scss rename to apps/animations/simple-animations/src/styles.scss diff --git a/apps/angular/32-change-detection-bug/src/test-setup.ts b/apps/animations/simple-animations/src/test-setup.ts similarity index 100% rename from apps/angular/32-change-detection-bug/src/test-setup.ts rename to apps/animations/simple-animations/src/test-setup.ts diff --git a/apps/angular/1-projection/tailwind.config.js b/apps/animations/simple-animations/tailwind.config.js similarity index 100% rename from apps/angular/1-projection/tailwind.config.js rename to apps/animations/simple-animations/tailwind.config.js diff --git a/apps/animations/simple-animations/tsconfig.app.json b/apps/animations/simple-animations/tsconfig.app.json new file mode 100644 index 000000000..3bb4877ea --- /dev/null +++ b/apps/animations/simple-animations/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/21-anchor-navigation/tsconfig.editor.json b/apps/animations/simple-animations/tsconfig.editor.json similarity index 100% rename from apps/angular/21-anchor-navigation/tsconfig.editor.json rename to apps/animations/simple-animations/tsconfig.editor.json diff --git a/apps/angular/45-react-in-angular/tsconfig.json b/apps/animations/simple-animations/tsconfig.json similarity index 100% rename from apps/angular/45-react-in-angular/tsconfig.json rename to apps/animations/simple-animations/tsconfig.json diff --git a/apps/angular/52-lazy-load-component/tsconfig.spec.json b/apps/animations/simple-animations/tsconfig.spec.json similarity index 80% rename from apps/angular/52-lazy-load-component/tsconfig.spec.json rename to apps/animations/simple-animations/tsconfig.spec.json index 1a4817a7d..9cfdcdeb3 100644 --- a/apps/angular/52-lazy-load-component/tsconfig.spec.json +++ b/apps/animations/simple-animations/tsconfig.spec.json @@ -5,9 +5,11 @@ "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" diff --git a/apps/angular/4-typed-context-outlet/.eslintrc.json b/apps/animations/view-transition/.eslintrc.json similarity index 100% rename from apps/angular/4-typed-context-outlet/.eslintrc.json rename to apps/animations/view-transition/.eslintrc.json diff --git a/apps/angular/44-view-transition/README.md b/apps/animations/view-transition/README.md similarity index 100% rename from apps/angular/44-view-transition/README.md rename to apps/animations/view-transition/README.md diff --git a/apps/angular/44-view-transition/project.json b/apps/animations/view-transition/project.json similarity index 100% rename from apps/angular/44-view-transition/project.json rename to apps/animations/view-transition/project.json diff --git a/apps/angular/44-view-transition/src/app/app.component.ts b/apps/animations/view-transition/src/app/app.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/app.component.ts rename to apps/animations/view-transition/src/app/app.component.ts diff --git a/apps/angular/44-view-transition/src/app/app.config.ts b/apps/animations/view-transition/src/app/app.config.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/app.config.ts rename to apps/animations/view-transition/src/app/app.config.ts diff --git a/apps/angular/44-view-transition/src/app/blog/blog.component.ts b/apps/animations/view-transition/src/app/blog/blog.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/blog/blog.component.ts rename to apps/animations/view-transition/src/app/blog/blog.component.ts diff --git a/apps/angular/44-view-transition/src/app/blog/thumbnail-header.component.ts b/apps/animations/view-transition/src/app/blog/thumbnail-header.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/blog/thumbnail-header.component.ts rename to apps/animations/view-transition/src/app/blog/thumbnail-header.component.ts diff --git a/apps/angular/44-view-transition/src/app/blog/thumbnail.component.ts b/apps/animations/view-transition/src/app/blog/thumbnail.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/blog/thumbnail.component.ts rename to apps/animations/view-transition/src/app/blog/thumbnail.component.ts diff --git a/apps/angular/44-view-transition/src/app/data.ts b/apps/animations/view-transition/src/app/data.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/data.ts rename to apps/animations/view-transition/src/app/data.ts diff --git a/apps/angular/44-view-transition/src/app/post.model.ts b/apps/animations/view-transition/src/app/post.model.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/post.model.ts rename to apps/animations/view-transition/src/app/post.model.ts diff --git a/apps/angular/44-view-transition/src/app/post/post-header.component.ts b/apps/animations/view-transition/src/app/post/post-header.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/post/post-header.component.ts rename to apps/animations/view-transition/src/app/post/post-header.component.ts diff --git a/apps/angular/44-view-transition/src/app/post/post.component.ts b/apps/animations/view-transition/src/app/post/post.component.ts similarity index 100% rename from apps/angular/44-view-transition/src/app/post/post.component.ts rename to apps/animations/view-transition/src/app/post/post.component.ts diff --git a/apps/angular/10-utility-wrapper-pipe/src/assets/.gitkeep b/apps/animations/view-transition/src/assets/.gitkeep similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/assets/.gitkeep rename to apps/animations/view-transition/src/assets/.gitkeep diff --git a/apps/angular/44-view-transition/src/assets/angular.webp b/apps/animations/view-transition/src/assets/angular.webp similarity index 100% rename from apps/angular/44-view-transition/src/assets/angular.webp rename to apps/animations/view-transition/src/assets/angular.webp diff --git a/apps/angular/44-view-transition/src/assets/guard.full.webp b/apps/animations/view-transition/src/assets/guard.full.webp similarity index 100% rename from apps/angular/44-view-transition/src/assets/guard.full.webp rename to apps/animations/view-transition/src/assets/guard.full.webp diff --git a/apps/angular/44-view-transition/src/assets/highly-custom.full.webp b/apps/animations/view-transition/src/assets/highly-custom.full.webp similarity index 100% rename from apps/angular/44-view-transition/src/assets/highly-custom.full.webp rename to apps/animations/view-transition/src/assets/highly-custom.full.webp diff --git a/apps/angular/44-view-transition/src/assets/profil.webp b/apps/animations/view-transition/src/assets/profil.webp similarity index 100% rename from apps/angular/44-view-transition/src/assets/profil.webp rename to apps/animations/view-transition/src/assets/profil.webp diff --git a/apps/angular/44-view-transition/src/assets/signal-cd.full.webp b/apps/animations/view-transition/src/assets/signal-cd.full.webp similarity index 100% rename from apps/angular/44-view-transition/src/assets/signal-cd.full.webp rename to apps/animations/view-transition/src/assets/signal-cd.full.webp diff --git a/apps/angular/10-utility-wrapper-pipe/src/favicon.ico b/apps/animations/view-transition/src/favicon.ico similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/favicon.ico rename to apps/animations/view-transition/src/favicon.ico diff --git a/apps/angular/44-view-transition/src/index.html b/apps/animations/view-transition/src/index.html similarity index 100% rename from apps/angular/44-view-transition/src/index.html rename to apps/animations/view-transition/src/index.html diff --git a/apps/angular/32-change-detection-bug/src/main.ts b/apps/animations/view-transition/src/main.ts similarity index 100% rename from apps/angular/32-change-detection-bug/src/main.ts rename to apps/animations/view-transition/src/main.ts diff --git a/apps/angular/1-projection/src/styles.scss b/apps/animations/view-transition/src/styles.scss similarity index 100% rename from apps/angular/1-projection/src/styles.scss rename to apps/animations/view-transition/src/styles.scss diff --git a/apps/angular/21-anchor-navigation/tailwind.config.js b/apps/animations/view-transition/tailwind.config.js similarity index 100% rename from apps/angular/21-anchor-navigation/tailwind.config.js rename to apps/animations/view-transition/tailwind.config.js diff --git a/apps/angular/52-lazy-load-component/tsconfig.app.json b/apps/animations/view-transition/tsconfig.app.json similarity index 87% rename from apps/angular/52-lazy-load-component/tsconfig.app.json rename to apps/animations/view-transition/tsconfig.app.json index 8b5631268..403fe4f54 100644 --- a/apps/angular/52-lazy-load-component/tsconfig.app.json +++ b/apps/animations/view-transition/tsconfig.app.json @@ -5,7 +5,9 @@ "types": [], "moduleResolution": "bundler" }, - "files": ["src/main.ts"], + "files": [ + "src/main.ts" + ], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] } diff --git a/apps/angular/13-highly-customizable-css/tsconfig.editor.json b/apps/animations/view-transition/tsconfig.editor.json similarity index 100% rename from apps/angular/13-highly-customizable-css/tsconfig.editor.json rename to apps/animations/view-transition/tsconfig.editor.json diff --git a/apps/angular/44-view-transition/tsconfig.json b/apps/animations/view-transition/tsconfig.json similarity index 100% rename from apps/angular/44-view-transition/tsconfig.json rename to apps/animations/view-transition/tsconfig.json diff --git a/apps/angular/13-highly-customizable-css/.eslintrc.json b/apps/best-practices/default-vs-onpush/.eslintrc.json similarity index 100% rename from apps/angular/13-highly-customizable-css/.eslintrc.json rename to apps/best-practices/default-vs-onpush/.eslintrc.json diff --git a/apps/performance/34-default-vs-onpush/README.md b/apps/best-practices/default-vs-onpush/README.md similarity index 100% rename from apps/performance/34-default-vs-onpush/README.md rename to apps/best-practices/default-vs-onpush/README.md diff --git a/apps/performance/34-default-vs-onpush/project.json b/apps/best-practices/default-vs-onpush/project.json similarity index 100% rename from apps/performance/34-default-vs-onpush/project.json rename to apps/best-practices/default-vs-onpush/project.json diff --git a/apps/performance/34-default-vs-onpush/src/app/app.component.ts b/apps/best-practices/default-vs-onpush/src/app/app.component.ts similarity index 100% rename from apps/performance/34-default-vs-onpush/src/app/app.component.ts rename to apps/best-practices/default-vs-onpush/src/app/app.component.ts diff --git a/apps/performance/34-default-vs-onpush/src/app/app.config.ts b/apps/best-practices/default-vs-onpush/src/app/app.config.ts similarity index 100% rename from apps/performance/34-default-vs-onpush/src/app/app.config.ts rename to apps/best-practices/default-vs-onpush/src/app/app.config.ts diff --git a/apps/performance/34-default-vs-onpush/src/app/person-list.component.ts b/apps/best-practices/default-vs-onpush/src/app/person-list.component.ts similarity index 100% rename from apps/performance/34-default-vs-onpush/src/app/person-list.component.ts rename to apps/best-practices/default-vs-onpush/src/app/person-list.component.ts diff --git a/apps/performance/34-default-vs-onpush/src/app/random.component.ts b/apps/best-practices/default-vs-onpush/src/app/random.component.ts similarity index 100% rename from apps/performance/34-default-vs-onpush/src/app/random.component.ts rename to apps/best-practices/default-vs-onpush/src/app/random.component.ts diff --git a/apps/angular/13-highly-customizable-css/src/assets/.gitkeep b/apps/best-practices/default-vs-onpush/src/assets/.gitkeep similarity index 100% rename from apps/angular/13-highly-customizable-css/src/assets/.gitkeep rename to apps/best-practices/default-vs-onpush/src/assets/.gitkeep diff --git a/apps/angular/13-highly-customizable-css/src/favicon.ico b/apps/best-practices/default-vs-onpush/src/favicon.ico similarity index 100% rename from apps/angular/13-highly-customizable-css/src/favicon.ico rename to apps/best-practices/default-vs-onpush/src/favicon.ico diff --git a/apps/performance/34-default-vs-onpush/src/index.html b/apps/best-practices/default-vs-onpush/src/index.html similarity index 100% rename from apps/performance/34-default-vs-onpush/src/index.html rename to apps/best-practices/default-vs-onpush/src/index.html diff --git a/apps/angular/39-injection-token/src/main.ts b/apps/best-practices/default-vs-onpush/src/main.ts similarity index 100% rename from apps/angular/39-injection-token/src/main.ts rename to apps/best-practices/default-vs-onpush/src/main.ts diff --git a/apps/angular/31-module-to-standalone/src/styles.scss b/apps/best-practices/default-vs-onpush/src/styles.scss similarity index 100% rename from apps/angular/31-module-to-standalone/src/styles.scss rename to apps/best-practices/default-vs-onpush/src/styles.scss diff --git a/apps/angular/32-change-detection-bug/tailwind.config.js b/apps/best-practices/default-vs-onpush/tailwind.config.js similarity index 100% rename from apps/angular/32-change-detection-bug/tailwind.config.js rename to apps/best-practices/default-vs-onpush/tailwind.config.js diff --git a/apps/angular/46-simple-animations/tsconfig.app.json b/apps/best-practices/default-vs-onpush/tsconfig.app.json similarity index 87% rename from apps/angular/46-simple-animations/tsconfig.app.json rename to apps/best-practices/default-vs-onpush/tsconfig.app.json index 8b5631268..403fe4f54 100644 --- a/apps/angular/46-simple-animations/tsconfig.app.json +++ b/apps/best-practices/default-vs-onpush/tsconfig.app.json @@ -5,7 +5,9 @@ "types": [], "moduleResolution": "bundler" }, - "files": ["src/main.ts"], + "files": [ + "src/main.ts" + ], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] } diff --git a/apps/performance/34-default-vs-onpush/tsconfig.editor.json b/apps/best-practices/default-vs-onpush/tsconfig.editor.json similarity index 61% rename from apps/performance/34-default-vs-onpush/tsconfig.editor.json rename to apps/best-practices/default-vs-onpush/tsconfig.editor.json index 146b6d2da..d8c1efdf0 100644 --- a/apps/performance/34-default-vs-onpush/tsconfig.editor.json +++ b/apps/best-practices/default-vs-onpush/tsconfig.editor.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "include": [ "src/**/*.ts", - "../../../libs/shared/directives/src/lib/cd-flashing.directive.ts" + "../../../libs/shared/directives/src/lib/cd-flashing.directive.ts" ], "compilerOptions": { "types": [] diff --git a/apps/angular/13-highly-customizable-css/tsconfig.json b/apps/best-practices/default-vs-onpush/tsconfig.json similarity index 100% rename from apps/angular/13-highly-customizable-css/tsconfig.json rename to apps/best-practices/default-vs-onpush/tsconfig.json diff --git a/apps/angular/45-react-in-angular/.eslintrc.json b/apps/best-practices/lazy-load-component/.eslintrc.json similarity index 100% rename from apps/angular/45-react-in-angular/.eslintrc.json rename to apps/best-practices/lazy-load-component/.eslintrc.json diff --git a/apps/angular/52-lazy-load-component/README.md b/apps/best-practices/lazy-load-component/README.md similarity index 100% rename from apps/angular/52-lazy-load-component/README.md rename to apps/best-practices/lazy-load-component/README.md diff --git a/apps/angular/52-lazy-load-component/jest.config.ts b/apps/best-practices/lazy-load-component/jest.config.ts similarity index 100% rename from apps/angular/52-lazy-load-component/jest.config.ts rename to apps/best-practices/lazy-load-component/jest.config.ts diff --git a/apps/angular/52-lazy-load-component/project.json b/apps/best-practices/lazy-load-component/project.json similarity index 100% rename from apps/angular/52-lazy-load-component/project.json rename to apps/best-practices/lazy-load-component/project.json diff --git a/apps/angular/52-lazy-load-component/src/app/app.component.ts b/apps/best-practices/lazy-load-component/src/app/app.component.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/app/app.component.ts rename to apps/best-practices/lazy-load-component/src/app/app.component.ts diff --git a/apps/angular/52-lazy-load-component/src/app/app.module.ts b/apps/best-practices/lazy-load-component/src/app/app.module.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/app/app.module.ts rename to apps/best-practices/lazy-load-component/src/app/app.module.ts diff --git a/apps/angular/52-lazy-load-component/src/app/placeholder.component.ts b/apps/best-practices/lazy-load-component/src/app/placeholder.component.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/app/placeholder.component.ts rename to apps/best-practices/lazy-load-component/src/app/placeholder.component.ts diff --git a/apps/angular/52-lazy-load-component/src/app/top.component.ts b/apps/best-practices/lazy-load-component/src/app/top.component.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/app/top.component.ts rename to apps/best-practices/lazy-load-component/src/app/top.component.ts diff --git a/apps/angular/16-master-dependency-injection/src/assets/.gitkeep b/apps/best-practices/lazy-load-component/src/assets/.gitkeep similarity index 100% rename from apps/angular/16-master-dependency-injection/src/assets/.gitkeep rename to apps/best-practices/lazy-load-component/src/assets/.gitkeep diff --git a/apps/angular/16-master-dependency-injection/src/favicon.ico b/apps/best-practices/lazy-load-component/src/favicon.ico similarity index 100% rename from apps/angular/16-master-dependency-injection/src/favicon.ico rename to apps/best-practices/lazy-load-component/src/favicon.ico diff --git a/apps/angular/52-lazy-load-component/src/index.html b/apps/best-practices/lazy-load-component/src/index.html similarity index 100% rename from apps/angular/52-lazy-load-component/src/index.html rename to apps/best-practices/lazy-load-component/src/index.html diff --git a/apps/angular/31-module-to-standalone/src/main.ts b/apps/best-practices/lazy-load-component/src/main.ts similarity index 100% rename from apps/angular/31-module-to-standalone/src/main.ts rename to apps/best-practices/lazy-load-component/src/main.ts diff --git a/apps/angular/32-change-detection-bug/src/styles.scss b/apps/best-practices/lazy-load-component/src/styles.scss similarity index 100% rename from apps/angular/32-change-detection-bug/src/styles.scss rename to apps/best-practices/lazy-load-component/src/styles.scss diff --git a/apps/angular/39-injection-token/src/test-setup.ts b/apps/best-practices/lazy-load-component/src/test-setup.ts similarity index 100% rename from apps/angular/39-injection-token/src/test-setup.ts rename to apps/best-practices/lazy-load-component/src/test-setup.ts diff --git a/apps/angular/33-decoupling-components/tailwind.config.js b/apps/best-practices/lazy-load-component/tailwind.config.js similarity index 100% rename from apps/angular/33-decoupling-components/tailwind.config.js rename to apps/best-practices/lazy-load-component/tailwind.config.js diff --git a/apps/best-practices/lazy-load-component/tsconfig.app.json b/apps/best-practices/lazy-load-component/tsconfig.app.json new file mode 100644 index 000000000..3bb4877ea --- /dev/null +++ b/apps/best-practices/lazy-load-component/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/signal/50-bug-in-effect/tsconfig.editor.json b/apps/best-practices/lazy-load-component/tsconfig.editor.json similarity index 53% rename from apps/signal/50-bug-in-effect/tsconfig.editor.json rename to apps/best-practices/lazy-load-component/tsconfig.editor.json index a8ac182c0..b10364017 100644 --- a/apps/signal/50-bug-in-effect/tsconfig.editor.json +++ b/apps/best-practices/lazy-load-component/tsconfig.editor.json @@ -2,5 +2,6 @@ "extends": "./tsconfig.json", "include": ["src/**/*.ts"], "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] } diff --git a/apps/angular/52-lazy-load-component/tsconfig.json b/apps/best-practices/lazy-load-component/tsconfig.json similarity index 100% rename from apps/angular/52-lazy-load-component/tsconfig.json rename to apps/best-practices/lazy-load-component/tsconfig.json diff --git a/apps/forms/41-control-value-accessor/tsconfig.spec.json b/apps/best-practices/lazy-load-component/tsconfig.spec.json similarity index 80% rename from apps/forms/41-control-value-accessor/tsconfig.spec.json rename to apps/best-practices/lazy-load-component/tsconfig.spec.json index 1a4817a7d..9cfdcdeb3 100644 --- a/apps/forms/41-control-value-accessor/tsconfig.spec.json +++ b/apps/best-practices/lazy-load-component/tsconfig.spec.json @@ -5,9 +5,11 @@ "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" diff --git a/apps/angular/21-anchor-navigation/.eslintrc.json b/apps/best-practices/memoization/.eslintrc.json similarity index 100% rename from apps/angular/21-anchor-navigation/.eslintrc.json rename to apps/best-practices/memoization/.eslintrc.json diff --git a/apps/performance/35-memoization/README.md b/apps/best-practices/memoization/README.md similarity index 100% rename from apps/performance/35-memoization/README.md rename to apps/best-practices/memoization/README.md diff --git a/apps/performance/35-memoization/project.json b/apps/best-practices/memoization/project.json similarity index 100% rename from apps/performance/35-memoization/project.json rename to apps/best-practices/memoization/project.json diff --git a/apps/performance/35-memoization/src/app/app.component.ts b/apps/best-practices/memoization/src/app/app.component.ts similarity index 100% rename from apps/performance/35-memoization/src/app/app.component.ts rename to apps/best-practices/memoization/src/app/app.component.ts diff --git a/apps/performance/35-memoization/src/app/app.config.ts b/apps/best-practices/memoization/src/app/app.config.ts similarity index 100% rename from apps/performance/35-memoization/src/app/app.config.ts rename to apps/best-practices/memoization/src/app/app.config.ts diff --git a/apps/performance/35-memoization/src/app/generateList.ts b/apps/best-practices/memoization/src/app/generateList.ts similarity index 100% rename from apps/performance/35-memoization/src/app/generateList.ts rename to apps/best-practices/memoization/src/app/generateList.ts diff --git a/apps/performance/35-memoization/src/app/person-list.component.ts b/apps/best-practices/memoization/src/app/person-list.component.ts similarity index 100% rename from apps/performance/35-memoization/src/app/person-list.component.ts rename to apps/best-practices/memoization/src/app/person-list.component.ts diff --git a/apps/performance/35-memoization/src/app/person.model.ts b/apps/best-practices/memoization/src/app/person.model.ts similarity index 100% rename from apps/performance/35-memoization/src/app/person.model.ts rename to apps/best-practices/memoization/src/app/person.model.ts diff --git a/apps/angular/21-anchor-navigation/src/assets/.gitkeep b/apps/best-practices/memoization/src/assets/.gitkeep similarity index 100% rename from apps/angular/21-anchor-navigation/src/assets/.gitkeep rename to apps/best-practices/memoization/src/assets/.gitkeep diff --git a/apps/angular/21-anchor-navigation/src/favicon.ico b/apps/best-practices/memoization/src/favicon.ico similarity index 100% rename from apps/angular/21-anchor-navigation/src/favicon.ico rename to apps/best-practices/memoization/src/favicon.ico diff --git a/apps/performance/35-memoization/src/index.html b/apps/best-practices/memoization/src/index.html similarity index 100% rename from apps/performance/35-memoization/src/index.html rename to apps/best-practices/memoization/src/index.html diff --git a/apps/angular/44-view-transition/src/main.ts b/apps/best-practices/memoization/src/main.ts similarity index 100% rename from apps/angular/44-view-transition/src/main.ts rename to apps/best-practices/memoization/src/main.ts diff --git a/apps/angular/33-decoupling-components/src/styles.scss b/apps/best-practices/memoization/src/styles.scss similarity index 100% rename from apps/angular/33-decoupling-components/src/styles.scss rename to apps/best-practices/memoization/src/styles.scss diff --git a/apps/angular/39-injection-token/tailwind.config.js b/apps/best-practices/memoization/tailwind.config.js similarity index 100% rename from apps/angular/39-injection-token/tailwind.config.js rename to apps/best-practices/memoization/tailwind.config.js diff --git a/apps/angular/55-back-button-navigation/tsconfig.app.json b/apps/best-practices/memoization/tsconfig.app.json similarity index 87% rename from apps/angular/55-back-button-navigation/tsconfig.app.json rename to apps/best-practices/memoization/tsconfig.app.json index 8b5631268..403fe4f54 100644 --- a/apps/angular/55-back-button-navigation/tsconfig.app.json +++ b/apps/best-practices/memoization/tsconfig.app.json @@ -5,7 +5,9 @@ "types": [], "moduleResolution": "bundler" }, - "files": ["src/main.ts"], + "files": [ + "src/main.ts" + ], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] } diff --git a/apps/angular/16-master-dependency-injection/tsconfig.editor.json b/apps/best-practices/memoization/tsconfig.editor.json similarity index 100% rename from apps/angular/16-master-dependency-injection/tsconfig.editor.json rename to apps/best-practices/memoization/tsconfig.editor.json diff --git a/apps/angular/16-master-dependency-injection/tsconfig.json b/apps/best-practices/memoization/tsconfig.json similarity index 100% rename from apps/angular/16-master-dependency-injection/tsconfig.json rename to apps/best-practices/memoization/tsconfig.json diff --git a/apps/angular/22-router-input/.eslintrc.json b/apps/best-practices/ngfor-optimization/.eslintrc.json similarity index 100% rename from apps/angular/22-router-input/.eslintrc.json rename to apps/best-practices/ngfor-optimization/.eslintrc.json diff --git a/apps/performance/36-ngfor-optimization/README.md b/apps/best-practices/ngfor-optimization/README.md similarity index 100% rename from apps/performance/36-ngfor-optimization/README.md rename to apps/best-practices/ngfor-optimization/README.md diff --git a/apps/performance/36-ngfor-optimization/jest.config.ts b/apps/best-practices/ngfor-optimization/jest.config.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/jest.config.ts rename to apps/best-practices/ngfor-optimization/jest.config.ts diff --git a/apps/performance/36-ngfor-optimization/project.json b/apps/best-practices/ngfor-optimization/project.json similarity index 100% rename from apps/performance/36-ngfor-optimization/project.json rename to apps/best-practices/ngfor-optimization/project.json diff --git a/apps/performance/36-ngfor-optimization/src/app/app.component.ts b/apps/best-practices/ngfor-optimization/src/app/app.component.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/app.component.ts rename to apps/best-practices/ngfor-optimization/src/app/app.component.ts diff --git a/apps/performance/36-ngfor-optimization/src/app/app.config.ts b/apps/best-practices/ngfor-optimization/src/app/app.config.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/app.config.ts rename to apps/best-practices/ngfor-optimization/src/app/app.config.ts diff --git a/apps/performance/36-ngfor-optimization/src/app/generateList.ts b/apps/best-practices/ngfor-optimization/src/app/generateList.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/generateList.ts rename to apps/best-practices/ngfor-optimization/src/app/generateList.ts diff --git a/apps/performance/36-ngfor-optimization/src/app/list.service.ts b/apps/best-practices/ngfor-optimization/src/app/list.service.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/list.service.ts rename to apps/best-practices/ngfor-optimization/src/app/list.service.ts diff --git a/apps/performance/36-ngfor-optimization/src/app/person-list.component.ts b/apps/best-practices/ngfor-optimization/src/app/person-list.component.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/person-list.component.ts rename to apps/best-practices/ngfor-optimization/src/app/person-list.component.ts diff --git a/apps/performance/36-ngfor-optimization/src/app/person.model.ts b/apps/best-practices/ngfor-optimization/src/app/person.model.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/app/person.model.ts rename to apps/best-practices/ngfor-optimization/src/app/person.model.ts diff --git a/apps/angular/22-router-input/src/assets/.gitkeep b/apps/best-practices/ngfor-optimization/src/assets/.gitkeep similarity index 100% rename from apps/angular/22-router-input/src/assets/.gitkeep rename to apps/best-practices/ngfor-optimization/src/assets/.gitkeep diff --git a/apps/angular/22-router-input/src/favicon.ico b/apps/best-practices/ngfor-optimization/src/favicon.ico similarity index 100% rename from apps/angular/22-router-input/src/favicon.ico rename to apps/best-practices/ngfor-optimization/src/favicon.ico diff --git a/apps/performance/36-ngfor-optimization/src/index.html b/apps/best-practices/ngfor-optimization/src/index.html similarity index 100% rename from apps/performance/36-ngfor-optimization/src/index.html rename to apps/best-practices/ngfor-optimization/src/index.html diff --git a/apps/angular/45-react-in-angular/src/main.ts b/apps/best-practices/ngfor-optimization/src/main.ts similarity index 100% rename from apps/angular/45-react-in-angular/src/main.ts rename to apps/best-practices/ngfor-optimization/src/main.ts diff --git a/apps/angular/39-injection-token/src/styles.scss b/apps/best-practices/ngfor-optimization/src/styles.scss similarity index 100% rename from apps/angular/39-injection-token/src/styles.scss rename to apps/best-practices/ngfor-optimization/src/styles.scss diff --git a/apps/angular/45-react-in-angular/src/test-setup.ts b/apps/best-practices/ngfor-optimization/src/test-setup.ts similarity index 100% rename from apps/angular/45-react-in-angular/src/test-setup.ts rename to apps/best-practices/ngfor-optimization/src/test-setup.ts diff --git a/apps/angular/44-view-transition/tailwind.config.js b/apps/best-practices/ngfor-optimization/tailwind.config.js similarity index 100% rename from apps/angular/44-view-transition/tailwind.config.js rename to apps/best-practices/ngfor-optimization/tailwind.config.js diff --git a/apps/best-practices/ngfor-optimization/tsconfig.app.json b/apps/best-practices/ngfor-optimization/tsconfig.app.json new file mode 100644 index 000000000..3bb4877ea --- /dev/null +++ b/apps/best-practices/ngfor-optimization/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/32-change-detection-bug/tsconfig.editor.json b/apps/best-practices/ngfor-optimization/tsconfig.editor.json similarity index 100% rename from apps/angular/32-change-detection-bug/tsconfig.editor.json rename to apps/best-practices/ngfor-optimization/tsconfig.editor.json diff --git a/apps/angular/21-anchor-navigation/tsconfig.json b/apps/best-practices/ngfor-optimization/tsconfig.json similarity index 100% rename from apps/angular/21-anchor-navigation/tsconfig.json rename to apps/best-practices/ngfor-optimization/tsconfig.json diff --git a/apps/performance/36-ngfor-optimization/tsconfig.spec.json b/apps/best-practices/ngfor-optimization/tsconfig.spec.json similarity index 80% rename from apps/performance/36-ngfor-optimization/tsconfig.spec.json rename to apps/best-practices/ngfor-optimization/tsconfig.spec.json index 1a4817a7d..9cfdcdeb3 100644 --- a/apps/performance/36-ngfor-optimization/tsconfig.spec.json +++ b/apps/best-practices/ngfor-optimization/tsconfig.spec.json @@ -5,9 +5,11 @@ "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" diff --git a/apps/angular/31-module-to-standalone/.eslintrc.json b/apps/best-practices/optimize-change-detection/.eslintrc.json similarity index 100% rename from apps/angular/31-module-to-standalone/.eslintrc.json rename to apps/best-practices/optimize-change-detection/.eslintrc.json diff --git a/apps/performance/12-optimize-change-detection/README.md b/apps/best-practices/optimize-change-detection/README.md similarity index 100% rename from apps/performance/12-optimize-change-detection/README.md rename to apps/best-practices/optimize-change-detection/README.md diff --git a/apps/performance/12-optimize-change-detection/jest.config.ts b/apps/best-practices/optimize-change-detection/jest.config.ts similarity index 100% rename from apps/performance/12-optimize-change-detection/jest.config.ts rename to apps/best-practices/optimize-change-detection/jest.config.ts diff --git a/apps/performance/12-optimize-change-detection/project.json b/apps/best-practices/optimize-change-detection/project.json similarity index 100% rename from apps/performance/12-optimize-change-detection/project.json rename to apps/best-practices/optimize-change-detection/project.json diff --git a/apps/performance/12-optimize-change-detection/src/app/app.component.ts b/apps/best-practices/optimize-change-detection/src/app/app.component.ts similarity index 100% rename from apps/performance/12-optimize-change-detection/src/app/app.component.ts rename to apps/best-practices/optimize-change-detection/src/app/app.component.ts diff --git a/apps/angular/31-module-to-standalone/src/assets/.gitkeep b/apps/best-practices/optimize-change-detection/src/assets/.gitkeep similarity index 100% rename from apps/angular/31-module-to-standalone/src/assets/.gitkeep rename to apps/best-practices/optimize-change-detection/src/assets/.gitkeep diff --git a/apps/angular/31-module-to-standalone/src/favicon.ico b/apps/best-practices/optimize-change-detection/src/favicon.ico similarity index 100% rename from apps/angular/31-module-to-standalone/src/favicon.ico rename to apps/best-practices/optimize-change-detection/src/favicon.ico diff --git a/apps/performance/12-optimize-change-detection/src/index.html b/apps/best-practices/optimize-change-detection/src/index.html similarity index 100% rename from apps/performance/12-optimize-change-detection/src/index.html rename to apps/best-practices/optimize-change-detection/src/index.html diff --git a/apps/angular/1-projection/src/main.ts b/apps/best-practices/optimize-change-detection/src/main.ts similarity index 100% rename from apps/angular/1-projection/src/main.ts rename to apps/best-practices/optimize-change-detection/src/main.ts diff --git a/apps/angular/10-utility-wrapper-pipe/src/styles.scss b/apps/best-practices/optimize-change-detection/src/styles.scss similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/styles.scss rename to apps/best-practices/optimize-change-detection/src/styles.scss diff --git a/apps/angular/1-projection/src/test-setup.ts b/apps/best-practices/optimize-change-detection/src/test-setup.ts similarity index 100% rename from apps/angular/1-projection/src/test-setup.ts rename to apps/best-practices/optimize-change-detection/src/test-setup.ts diff --git a/apps/best-practices/optimize-change-detection/tsconfig.app.json b/apps/best-practices/optimize-change-detection/tsconfig.app.json new file mode 100644 index 000000000..3bb4877ea --- /dev/null +++ b/apps/best-practices/optimize-change-detection/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/39-injection-token/tsconfig.editor.json b/apps/best-practices/optimize-change-detection/tsconfig.editor.json similarity index 100% rename from apps/angular/39-injection-token/tsconfig.editor.json rename to apps/best-practices/optimize-change-detection/tsconfig.editor.json diff --git a/apps/angular/32-change-detection-bug/tsconfig.json b/apps/best-practices/optimize-change-detection/tsconfig.json similarity index 100% rename from apps/angular/32-change-detection-bug/tsconfig.json rename to apps/best-practices/optimize-change-detection/tsconfig.json diff --git a/apps/rxjs/14-race-condition/tsconfig.spec.json b/apps/best-practices/optimize-change-detection/tsconfig.spec.json similarity index 78% rename from apps/rxjs/14-race-condition/tsconfig.spec.json rename to apps/best-practices/optimize-change-detection/tsconfig.spec.json index ca14cc622..173fe9a7d 100644 --- a/apps/rxjs/14-race-condition/tsconfig.spec.json +++ b/apps/best-practices/optimize-change-detection/tsconfig.spec.json @@ -5,9 +5,11 @@ "module": "commonjs", "types": ["jest", "node"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" diff --git a/apps/angular/46-simple-animations/.eslintrc.json b/apps/components-and-templates/content-projection-default/.eslintrc.json similarity index 100% rename from apps/angular/46-simple-animations/.eslintrc.json rename to apps/components-and-templates/content-projection-default/.eslintrc.json diff --git a/apps/angular/57-content-projection-default/README.md b/apps/components-and-templates/content-projection-default/README.md similarity index 100% rename from apps/angular/57-content-projection-default/README.md rename to apps/components-and-templates/content-projection-default/README.md diff --git a/apps/angular/57-content-projection-default/project.json b/apps/components-and-templates/content-projection-default/project.json similarity index 100% rename from apps/angular/57-content-projection-default/project.json rename to apps/components-and-templates/content-projection-default/project.json diff --git a/apps/angular/32-change-detection-bug/src/favicon.ico b/apps/components-and-templates/content-projection-default/public/favicon.ico similarity index 100% rename from apps/angular/32-change-detection-bug/src/favicon.ico rename to apps/components-and-templates/content-projection-default/public/favicon.ico diff --git a/apps/angular/57-content-projection-default/src/app/app.component.ts b/apps/components-and-templates/content-projection-default/src/app/app.component.ts similarity index 100% rename from apps/angular/57-content-projection-default/src/app/app.component.ts rename to apps/components-and-templates/content-projection-default/src/app/app.component.ts diff --git a/apps/angular/57-content-projection-default/src/app/app.config.ts b/apps/components-and-templates/content-projection-default/src/app/app.config.ts similarity index 100% rename from apps/angular/57-content-projection-default/src/app/app.config.ts rename to apps/components-and-templates/content-projection-default/src/app/app.config.ts diff --git a/apps/angular/57-content-projection-default/src/app/card.component.ts b/apps/components-and-templates/content-projection-default/src/app/card.component.ts similarity index 100% rename from apps/angular/57-content-projection-default/src/app/card.component.ts rename to apps/components-and-templates/content-projection-default/src/app/card.component.ts diff --git a/apps/angular/57-content-projection-default/src/index.html b/apps/components-and-templates/content-projection-default/src/index.html similarity index 100% rename from apps/angular/57-content-projection-default/src/index.html rename to apps/components-and-templates/content-projection-default/src/index.html diff --git a/apps/angular/46-simple-animations/src/main.ts b/apps/components-and-templates/content-projection-default/src/main.ts similarity index 100% rename from apps/angular/46-simple-animations/src/main.ts rename to apps/components-and-templates/content-projection-default/src/main.ts diff --git a/apps/angular/45-react-in-angular/src/styles.scss b/apps/components-and-templates/content-projection-default/src/styles.scss similarity index 100% rename from apps/angular/45-react-in-angular/src/styles.scss rename to apps/components-and-templates/content-projection-default/src/styles.scss diff --git a/apps/angular/45-react-in-angular/tailwind.config.js b/apps/components-and-templates/content-projection-default/tailwind.config.js similarity index 100% rename from apps/angular/45-react-in-angular/tailwind.config.js rename to apps/components-and-templates/content-projection-default/tailwind.config.js diff --git a/apps/angular/57-content-projection-default/tsconfig.app.json b/apps/components-and-templates/content-projection-default/tsconfig.app.json similarity index 87% rename from apps/angular/57-content-projection-default/tsconfig.app.json rename to apps/components-and-templates/content-projection-default/tsconfig.app.json index 8b5631268..403fe4f54 100644 --- a/apps/angular/57-content-projection-default/tsconfig.app.json +++ b/apps/components-and-templates/content-projection-default/tsconfig.app.json @@ -5,7 +5,9 @@ "types": [], "moduleResolution": "bundler" }, - "files": ["src/main.ts"], + "files": [ + "src/main.ts" + ], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] } diff --git a/apps/angular/52-lazy-load-component/tsconfig.editor.json b/apps/components-and-templates/content-projection-default/tsconfig.editor.json similarity index 100% rename from apps/angular/52-lazy-load-component/tsconfig.editor.json rename to apps/components-and-templates/content-projection-default/tsconfig.editor.json diff --git a/apps/angular/57-content-projection-default/tsconfig.json b/apps/components-and-templates/content-projection-default/tsconfig.json similarity index 100% rename from apps/angular/57-content-projection-default/tsconfig.json rename to apps/components-and-templates/content-projection-default/tsconfig.json diff --git a/apps/angular/5-crud-application/.eslintrc.json b/apps/components-and-templates/crud-application/.eslintrc.json similarity index 100% rename from apps/angular/5-crud-application/.eslintrc.json rename to apps/components-and-templates/crud-application/.eslintrc.json diff --git a/apps/angular/5-crud-application/README.md b/apps/components-and-templates/crud-application/README.md similarity index 100% rename from apps/angular/5-crud-application/README.md rename to apps/components-and-templates/crud-application/README.md diff --git a/apps/angular/5-crud-application/jest.config.ts b/apps/components-and-templates/crud-application/jest.config.ts similarity index 100% rename from apps/angular/5-crud-application/jest.config.ts rename to apps/components-and-templates/crud-application/jest.config.ts diff --git a/apps/angular/5-crud-application/project.json b/apps/components-and-templates/crud-application/project.json similarity index 100% rename from apps/angular/5-crud-application/project.json rename to apps/components-and-templates/crud-application/project.json diff --git a/apps/angular/5-crud-application/src/app/app.component.ts b/apps/components-and-templates/crud-application/src/app/app.component.ts similarity index 100% rename from apps/angular/5-crud-application/src/app/app.component.ts rename to apps/components-and-templates/crud-application/src/app/app.component.ts diff --git a/apps/angular/5-crud-application/src/app/app.config.ts b/apps/components-and-templates/crud-application/src/app/app.config.ts similarity index 100% rename from apps/angular/5-crud-application/src/app/app.config.ts rename to apps/components-and-templates/crud-application/src/app/app.config.ts diff --git a/apps/angular/32-change-detection-bug/src/assets/.gitkeep b/apps/components-and-templates/crud-application/src/assets/.gitkeep similarity index 100% rename from apps/angular/32-change-detection-bug/src/assets/.gitkeep rename to apps/components-and-templates/crud-application/src/assets/.gitkeep diff --git a/apps/angular/33-decoupling-components/src/favicon.ico b/apps/components-and-templates/crud-application/src/favicon.ico similarity index 100% rename from apps/angular/33-decoupling-components/src/favicon.ico rename to apps/components-and-templates/crud-application/src/favicon.ico diff --git a/apps/angular/5-crud-application/src/index.html b/apps/components-and-templates/crud-application/src/index.html similarity index 100% rename from apps/angular/5-crud-application/src/index.html rename to apps/components-and-templates/crud-application/src/index.html diff --git a/apps/angular/5-crud-application/src/main.ts b/apps/components-and-templates/crud-application/src/main.ts similarity index 100% rename from apps/angular/5-crud-application/src/main.ts rename to apps/components-and-templates/crud-application/src/main.ts diff --git a/apps/angular/1-projection/src/polyfills.ts b/apps/components-and-templates/crud-application/src/polyfills.ts similarity index 100% rename from apps/angular/1-projection/src/polyfills.ts rename to apps/components-and-templates/crud-application/src/polyfills.ts diff --git a/apps/angular/5-crud-application/src/styles.scss b/apps/components-and-templates/crud-application/src/styles.scss similarity index 100% rename from apps/angular/5-crud-application/src/styles.scss rename to apps/components-and-templates/crud-application/src/styles.scss diff --git a/apps/angular/46-simple-animations/src/test-setup.ts b/apps/components-and-templates/crud-application/src/test-setup.ts similarity index 100% rename from apps/angular/46-simple-animations/src/test-setup.ts rename to apps/components-and-templates/crud-application/src/test-setup.ts diff --git a/apps/components-and-templates/crud-application/tsconfig.app.json b/apps/components-and-templates/crud-application/tsconfig.app.json new file mode 100644 index 000000000..35bb97a53 --- /dev/null +++ b/apps/components-and-templates/crud-application/tsconfig.app.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "target": "ES2022", + "useDefineForClassFields": false, + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] +} diff --git a/apps/angular/10-utility-wrapper-pipe/tsconfig.editor.json b/apps/components-and-templates/crud-application/tsconfig.editor.json similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/tsconfig.editor.json rename to apps/components-and-templates/crud-application/tsconfig.editor.json diff --git a/apps/angular/1-projection/tsconfig.json b/apps/components-and-templates/crud-application/tsconfig.json similarity index 100% rename from apps/angular/1-projection/tsconfig.json rename to apps/components-and-templates/crud-application/tsconfig.json diff --git a/apps/rxjs/38-catch-error/tsconfig.spec.json b/apps/components-and-templates/crud-application/tsconfig.spec.json similarity index 61% rename from apps/rxjs/38-catch-error/tsconfig.spec.json rename to apps/components-and-templates/crud-application/tsconfig.spec.json index c0c092e1e..4d9c75e39 100644 --- a/apps/rxjs/38-catch-error/tsconfig.spec.json +++ b/apps/components-and-templates/crud-application/tsconfig.spec.json @@ -5,11 +5,9 @@ "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] } diff --git a/apps/angular/1-projection/.eslintrc.json b/apps/components-and-templates/projection/.eslintrc.json similarity index 100% rename from apps/angular/1-projection/.eslintrc.json rename to apps/components-and-templates/projection/.eslintrc.json diff --git a/apps/angular/1-projection/README.md b/apps/components-and-templates/projection/README.md similarity index 100% rename from apps/angular/1-projection/README.md rename to apps/components-and-templates/projection/README.md diff --git a/apps/angular/1-projection/jest.config.ts b/apps/components-and-templates/projection/jest.config.ts similarity index 100% rename from apps/angular/1-projection/jest.config.ts rename to apps/components-and-templates/projection/jest.config.ts diff --git a/apps/angular/1-projection/project.json b/apps/components-and-templates/projection/project.json similarity index 100% rename from apps/angular/1-projection/project.json rename to apps/components-and-templates/projection/project.json diff --git a/apps/angular/1-projection/src/app/app.component.ts b/apps/components-and-templates/projection/src/app/app.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/app.component.ts rename to apps/components-and-templates/projection/src/app/app.component.ts diff --git a/apps/angular/1-projection/src/app/component/city-card/city-card.component.ts b/apps/components-and-templates/projection/src/app/component/city-card/city-card.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/component/city-card/city-card.component.ts rename to apps/components-and-templates/projection/src/app/component/city-card/city-card.component.ts diff --git a/apps/angular/1-projection/src/app/component/student-card/student-card.component.ts b/apps/components-and-templates/projection/src/app/component/student-card/student-card.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/component/student-card/student-card.component.ts rename to apps/components-and-templates/projection/src/app/component/student-card/student-card.component.ts diff --git a/apps/angular/1-projection/src/app/component/teacher-card/teacher-card.component.ts b/apps/components-and-templates/projection/src/app/component/teacher-card/teacher-card.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/component/teacher-card/teacher-card.component.ts rename to apps/components-and-templates/projection/src/app/component/teacher-card/teacher-card.component.ts diff --git a/apps/angular/1-projection/src/app/data-access/city.store.ts b/apps/components-and-templates/projection/src/app/data-access/city.store.ts similarity index 100% rename from apps/angular/1-projection/src/app/data-access/city.store.ts rename to apps/components-and-templates/projection/src/app/data-access/city.store.ts diff --git a/apps/angular/1-projection/src/app/data-access/fake-http.service.ts b/apps/components-and-templates/projection/src/app/data-access/fake-http.service.ts similarity index 100% rename from apps/angular/1-projection/src/app/data-access/fake-http.service.ts rename to apps/components-and-templates/projection/src/app/data-access/fake-http.service.ts diff --git a/apps/angular/1-projection/src/app/data-access/student.store.ts b/apps/components-and-templates/projection/src/app/data-access/student.store.ts similarity index 100% rename from apps/angular/1-projection/src/app/data-access/student.store.ts rename to apps/components-and-templates/projection/src/app/data-access/student.store.ts diff --git a/apps/angular/1-projection/src/app/data-access/teacher.store.ts b/apps/components-and-templates/projection/src/app/data-access/teacher.store.ts similarity index 100% rename from apps/angular/1-projection/src/app/data-access/teacher.store.ts rename to apps/components-and-templates/projection/src/app/data-access/teacher.store.ts diff --git a/apps/angular/1-projection/src/app/model/card.model.ts b/apps/components-and-templates/projection/src/app/model/card.model.ts similarity index 100% rename from apps/angular/1-projection/src/app/model/card.model.ts rename to apps/components-and-templates/projection/src/app/model/card.model.ts diff --git a/apps/angular/1-projection/src/app/model/city.model.ts b/apps/components-and-templates/projection/src/app/model/city.model.ts similarity index 100% rename from apps/angular/1-projection/src/app/model/city.model.ts rename to apps/components-and-templates/projection/src/app/model/city.model.ts diff --git a/apps/angular/1-projection/src/app/model/student.model.ts b/apps/components-and-templates/projection/src/app/model/student.model.ts similarity index 100% rename from apps/angular/1-projection/src/app/model/student.model.ts rename to apps/components-and-templates/projection/src/app/model/student.model.ts diff --git a/apps/angular/1-projection/src/app/model/teacher.model.ts b/apps/components-and-templates/projection/src/app/model/teacher.model.ts similarity index 100% rename from apps/angular/1-projection/src/app/model/teacher.model.ts rename to apps/components-and-templates/projection/src/app/model/teacher.model.ts diff --git a/apps/angular/1-projection/src/app/ui/card/card.component.ts b/apps/components-and-templates/projection/src/app/ui/card/card.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/ui/card/card.component.ts rename to apps/components-and-templates/projection/src/app/ui/card/card.component.ts diff --git a/apps/angular/1-projection/src/app/ui/list-item/list-item.component.ts b/apps/components-and-templates/projection/src/app/ui/list-item/list-item.component.ts similarity index 100% rename from apps/angular/1-projection/src/app/ui/list-item/list-item.component.ts rename to apps/components-and-templates/projection/src/app/ui/list-item/list-item.component.ts diff --git a/apps/angular/33-decoupling-components/src/assets/.gitkeep b/apps/components-and-templates/projection/src/assets/.gitkeep similarity index 100% rename from apps/angular/33-decoupling-components/src/assets/.gitkeep rename to apps/components-and-templates/projection/src/assets/.gitkeep diff --git a/apps/angular/1-projection/src/assets/img/city.png b/apps/components-and-templates/projection/src/assets/img/city.png similarity index 100% rename from apps/angular/1-projection/src/assets/img/city.png rename to apps/components-and-templates/projection/src/assets/img/city.png diff --git a/apps/angular/1-projection/src/assets/img/student.webp b/apps/components-and-templates/projection/src/assets/img/student.webp similarity index 100% rename from apps/angular/1-projection/src/assets/img/student.webp rename to apps/components-and-templates/projection/src/assets/img/student.webp diff --git a/apps/angular/1-projection/src/assets/img/teacher.png b/apps/components-and-templates/projection/src/assets/img/teacher.png similarity index 100% rename from apps/angular/1-projection/src/assets/img/teacher.png rename to apps/components-and-templates/projection/src/assets/img/teacher.png diff --git a/apps/angular/1-projection/src/assets/svg/trash.svg b/apps/components-and-templates/projection/src/assets/svg/trash.svg similarity index 100% rename from apps/angular/1-projection/src/assets/svg/trash.svg rename to apps/components-and-templates/projection/src/assets/svg/trash.svg diff --git a/apps/angular/39-injection-token/src/favicon.ico b/apps/components-and-templates/projection/src/favicon.ico similarity index 100% rename from apps/angular/39-injection-token/src/favicon.ico rename to apps/components-and-templates/projection/src/favicon.ico diff --git a/apps/angular/1-projection/src/index.html b/apps/components-and-templates/projection/src/index.html similarity index 100% rename from apps/angular/1-projection/src/index.html rename to apps/components-and-templates/projection/src/index.html diff --git a/apps/angular/10-utility-wrapper-pipe/src/main.ts b/apps/components-and-templates/projection/src/main.ts similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/main.ts rename to apps/components-and-templates/projection/src/main.ts diff --git a/apps/angular/10-utility-wrapper-pipe/src/polyfills.ts b/apps/components-and-templates/projection/src/polyfills.ts similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/polyfills.ts rename to apps/components-and-templates/projection/src/polyfills.ts diff --git a/apps/angular/44-view-transition/src/styles.scss b/apps/components-and-templates/projection/src/styles.scss similarity index 100% rename from apps/angular/44-view-transition/src/styles.scss rename to apps/components-and-templates/projection/src/styles.scss diff --git a/apps/angular/21-anchor-navigation/src/test-setup.ts b/apps/components-and-templates/projection/src/test-setup.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/test-setup.ts rename to apps/components-and-templates/projection/src/test-setup.ts diff --git a/apps/angular/46-simple-animations/tailwind.config.js b/apps/components-and-templates/projection/tailwind.config.js similarity index 100% rename from apps/angular/46-simple-animations/tailwind.config.js rename to apps/components-and-templates/projection/tailwind.config.js diff --git a/apps/components-and-templates/projection/tsconfig.app.json b/apps/components-and-templates/projection/tsconfig.app.json new file mode 100644 index 000000000..35bb97a53 --- /dev/null +++ b/apps/components-and-templates/projection/tsconfig.app.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "target": "ES2022", + "useDefineForClassFields": false, + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] +} diff --git a/apps/angular/1-projection/tsconfig.editor.json b/apps/components-and-templates/projection/tsconfig.editor.json similarity index 100% rename from apps/angular/1-projection/tsconfig.editor.json rename to apps/components-and-templates/projection/tsconfig.editor.json diff --git a/apps/angular/5-crud-application/tsconfig.json b/apps/components-and-templates/projection/tsconfig.json similarity index 100% rename from apps/angular/5-crud-application/tsconfig.json rename to apps/components-and-templates/projection/tsconfig.json diff --git a/apps/angular/1-projection/tsconfig.spec.json b/apps/components-and-templates/projection/tsconfig.spec.json similarity index 55% rename from apps/angular/1-projection/tsconfig.spec.json rename to apps/components-and-templates/projection/tsconfig.spec.json index 7aa46d88c..38992e485 100644 --- a/apps/angular/1-projection/tsconfig.spec.json +++ b/apps/components-and-templates/projection/tsconfig.spec.json @@ -5,6 +5,9 @@ "module": "commonjs", "types": ["jest", "node"] }, - "files": ["src/test-setup.ts"], - "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] + "files": [ + "src/test-setup.ts" + ], + "include": [ + "jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] } diff --git a/apps/angular/16-master-dependency-injection/.eslintrc.json b/apps/dependency-injection/injection-token/.eslintrc.json similarity index 100% rename from apps/angular/16-master-dependency-injection/.eslintrc.json rename to apps/dependency-injection/injection-token/.eslintrc.json diff --git a/apps/angular/39-injection-token/README.md b/apps/dependency-injection/injection-token/README.md similarity index 100% rename from apps/angular/39-injection-token/README.md rename to apps/dependency-injection/injection-token/README.md diff --git a/apps/angular/39-injection-token/jest.config.ts b/apps/dependency-injection/injection-token/jest.config.ts similarity index 100% rename from apps/angular/39-injection-token/jest.config.ts rename to apps/dependency-injection/injection-token/jest.config.ts diff --git a/apps/angular/39-injection-token/project.json b/apps/dependency-injection/injection-token/project.json similarity index 100% rename from apps/angular/39-injection-token/project.json rename to apps/dependency-injection/injection-token/project.json diff --git a/apps/angular/39-injection-token/src/app/app.component.ts b/apps/dependency-injection/injection-token/src/app/app.component.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/app.component.ts rename to apps/dependency-injection/injection-token/src/app/app.component.ts diff --git a/apps/angular/39-injection-token/src/app/app.config.ts b/apps/dependency-injection/injection-token/src/app/app.config.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/app.config.ts rename to apps/dependency-injection/injection-token/src/app/app.config.ts diff --git a/apps/angular/39-injection-token/src/app/data.ts b/apps/dependency-injection/injection-token/src/app/data.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/data.ts rename to apps/dependency-injection/injection-token/src/app/data.ts diff --git a/apps/angular/39-injection-token/src/app/phone.component.ts b/apps/dependency-injection/injection-token/src/app/phone.component.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/phone.component.ts rename to apps/dependency-injection/injection-token/src/app/phone.component.ts diff --git a/apps/angular/39-injection-token/src/app/timer-container.component.ts b/apps/dependency-injection/injection-token/src/app/timer-container.component.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/timer-container.component.ts rename to apps/dependency-injection/injection-token/src/app/timer-container.component.ts diff --git a/apps/angular/39-injection-token/src/app/timer.component.ts b/apps/dependency-injection/injection-token/src/app/timer.component.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/timer.component.ts rename to apps/dependency-injection/injection-token/src/app/timer.component.ts diff --git a/apps/angular/39-injection-token/src/app/video.component.ts b/apps/dependency-injection/injection-token/src/app/video.component.ts similarity index 100% rename from apps/angular/39-injection-token/src/app/video.component.ts rename to apps/dependency-injection/injection-token/src/app/video.component.ts diff --git a/apps/angular/39-injection-token/src/assets/.gitkeep b/apps/dependency-injection/injection-token/src/assets/.gitkeep similarity index 100% rename from apps/angular/39-injection-token/src/assets/.gitkeep rename to apps/dependency-injection/injection-token/src/assets/.gitkeep diff --git a/apps/angular/4-typed-context-outlet/src/favicon.ico b/apps/dependency-injection/injection-token/src/favicon.ico similarity index 100% rename from apps/angular/4-typed-context-outlet/src/favicon.ico rename to apps/dependency-injection/injection-token/src/favicon.ico diff --git a/apps/angular/39-injection-token/src/index.html b/apps/dependency-injection/injection-token/src/index.html similarity index 100% rename from apps/angular/39-injection-token/src/index.html rename to apps/dependency-injection/injection-token/src/index.html diff --git a/apps/angular/55-back-button-navigation/src/main.ts b/apps/dependency-injection/injection-token/src/main.ts similarity index 100% rename from apps/angular/55-back-button-navigation/src/main.ts rename to apps/dependency-injection/injection-token/src/main.ts diff --git a/apps/angular/46-simple-animations/src/styles.scss b/apps/dependency-injection/injection-token/src/styles.scss similarity index 100% rename from apps/angular/46-simple-animations/src/styles.scss rename to apps/dependency-injection/injection-token/src/styles.scss diff --git a/apps/angular/5-crud-application/src/test-setup.ts b/apps/dependency-injection/injection-token/src/test-setup.ts similarity index 100% rename from apps/angular/5-crud-application/src/test-setup.ts rename to apps/dependency-injection/injection-token/src/test-setup.ts diff --git a/apps/angular/52-lazy-load-component/tailwind.config.js b/apps/dependency-injection/injection-token/tailwind.config.js similarity index 100% rename from apps/angular/52-lazy-load-component/tailwind.config.js rename to apps/dependency-injection/injection-token/tailwind.config.js diff --git a/apps/angular/13-highly-customizable-css/tsconfig.app.json b/apps/dependency-injection/injection-token/tsconfig.app.json similarity index 100% rename from apps/angular/13-highly-customizable-css/tsconfig.app.json rename to apps/dependency-injection/injection-token/tsconfig.app.json diff --git a/apps/angular/45-react-in-angular/tsconfig.editor.json b/apps/dependency-injection/injection-token/tsconfig.editor.json similarity index 100% rename from apps/angular/45-react-in-angular/tsconfig.editor.json rename to apps/dependency-injection/injection-token/tsconfig.editor.json diff --git a/apps/angular/39-injection-token/tsconfig.json b/apps/dependency-injection/injection-token/tsconfig.json similarity index 100% rename from apps/angular/39-injection-token/tsconfig.json rename to apps/dependency-injection/injection-token/tsconfig.json diff --git a/apps/angular/39-injection-token/tsconfig.spec.json b/apps/dependency-injection/injection-token/tsconfig.spec.json similarity index 100% rename from apps/angular/39-injection-token/tsconfig.spec.json rename to apps/dependency-injection/injection-token/tsconfig.spec.json diff --git a/apps/angular/39-injection-token/.eslintrc.json b/apps/dependency-injection/master-dependency-injection/.eslintrc.json similarity index 100% rename from apps/angular/39-injection-token/.eslintrc.json rename to apps/dependency-injection/master-dependency-injection/.eslintrc.json diff --git a/apps/angular/16-master-dependency-injection/README.md b/apps/dependency-injection/master-dependency-injection/README.md similarity index 100% rename from apps/angular/16-master-dependency-injection/README.md rename to apps/dependency-injection/master-dependency-injection/README.md diff --git a/apps/angular/16-master-dependency-injection/project.json b/apps/dependency-injection/master-dependency-injection/project.json similarity index 100% rename from apps/angular/16-master-dependency-injection/project.json rename to apps/dependency-injection/master-dependency-injection/project.json diff --git a/apps/angular/16-master-dependency-injection/src/app/app.component.ts b/apps/dependency-injection/master-dependency-injection/src/app/app.component.ts similarity index 100% rename from apps/angular/16-master-dependency-injection/src/app/app.component.ts rename to apps/dependency-injection/master-dependency-injection/src/app/app.component.ts diff --git a/apps/angular/16-master-dependency-injection/src/app/currency.pipe.ts b/apps/dependency-injection/master-dependency-injection/src/app/currency.pipe.ts similarity index 100% rename from apps/angular/16-master-dependency-injection/src/app/currency.pipe.ts rename to apps/dependency-injection/master-dependency-injection/src/app/currency.pipe.ts diff --git a/apps/angular/16-master-dependency-injection/src/app/currency.service.ts b/apps/dependency-injection/master-dependency-injection/src/app/currency.service.ts similarity index 100% rename from apps/angular/16-master-dependency-injection/src/app/currency.service.ts rename to apps/dependency-injection/master-dependency-injection/src/app/currency.service.ts diff --git a/apps/angular/16-master-dependency-injection/src/app/product.model.ts b/apps/dependency-injection/master-dependency-injection/src/app/product.model.ts similarity index 100% rename from apps/angular/16-master-dependency-injection/src/app/product.model.ts rename to apps/dependency-injection/master-dependency-injection/src/app/product.model.ts diff --git a/apps/angular/44-view-transition/src/assets/.gitkeep b/apps/dependency-injection/master-dependency-injection/src/assets/.gitkeep similarity index 100% rename from apps/angular/44-view-transition/src/assets/.gitkeep rename to apps/dependency-injection/master-dependency-injection/src/assets/.gitkeep diff --git a/apps/angular/44-view-transition/src/favicon.ico b/apps/dependency-injection/master-dependency-injection/src/favicon.ico similarity index 100% rename from apps/angular/44-view-transition/src/favicon.ico rename to apps/dependency-injection/master-dependency-injection/src/favicon.ico diff --git a/apps/angular/16-master-dependency-injection/src/index.html b/apps/dependency-injection/master-dependency-injection/src/index.html similarity index 100% rename from apps/angular/16-master-dependency-injection/src/index.html rename to apps/dependency-injection/master-dependency-injection/src/index.html diff --git a/apps/angular/16-master-dependency-injection/src/main.ts b/apps/dependency-injection/master-dependency-injection/src/main.ts similarity index 100% rename from apps/angular/16-master-dependency-injection/src/main.ts rename to apps/dependency-injection/master-dependency-injection/src/main.ts diff --git a/apps/angular/16-master-dependency-injection/src/styles.scss b/apps/dependency-injection/master-dependency-injection/src/styles.scss similarity index 100% rename from apps/angular/16-master-dependency-injection/src/styles.scss rename to apps/dependency-injection/master-dependency-injection/src/styles.scss diff --git a/apps/dependency-injection/master-dependency-injection/tsconfig.app.json b/apps/dependency-injection/master-dependency-injection/tsconfig.app.json new file mode 100644 index 000000000..403fe4f54 --- /dev/null +++ b/apps/dependency-injection/master-dependency-injection/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/22-router-input/tsconfig.editor.json b/apps/dependency-injection/master-dependency-injection/tsconfig.editor.json similarity index 100% rename from apps/angular/22-router-input/tsconfig.editor.json rename to apps/dependency-injection/master-dependency-injection/tsconfig.editor.json diff --git a/apps/angular/22-router-input/tsconfig.json b/apps/dependency-injection/master-dependency-injection/tsconfig.json similarity index 100% rename from apps/angular/22-router-input/tsconfig.json rename to apps/dependency-injection/master-dependency-injection/tsconfig.json diff --git a/apps/angular/52-lazy-load-component/.eslintrc.json b/apps/directives-and-pipes/pure-pipe/.eslintrc.json similarity index 100% rename from apps/angular/52-lazy-load-component/.eslintrc.json rename to apps/directives-and-pipes/pure-pipe/.eslintrc.json diff --git a/apps/angular/8-pure-pipe/README.md b/apps/directives-and-pipes/pure-pipe/README.md similarity index 100% rename from apps/angular/8-pure-pipe/README.md rename to apps/directives-and-pipes/pure-pipe/README.md diff --git a/apps/angular/8-pure-pipe/project.json b/apps/directives-and-pipes/pure-pipe/project.json similarity index 100% rename from apps/angular/8-pure-pipe/project.json rename to apps/directives-and-pipes/pure-pipe/project.json diff --git a/apps/angular/8-pure-pipe/src/app/app.component.ts b/apps/directives-and-pipes/pure-pipe/src/app/app.component.ts similarity index 100% rename from apps/angular/8-pure-pipe/src/app/app.component.ts rename to apps/directives-and-pipes/pure-pipe/src/app/app.component.ts diff --git a/apps/angular/45-react-in-angular/src/assets/.gitkeep b/apps/directives-and-pipes/pure-pipe/src/assets/.gitkeep similarity index 100% rename from apps/angular/45-react-in-angular/src/assets/.gitkeep rename to apps/directives-and-pipes/pure-pipe/src/assets/.gitkeep diff --git a/apps/angular/45-react-in-angular/src/favicon.ico b/apps/directives-and-pipes/pure-pipe/src/favicon.ico similarity index 100% rename from apps/angular/45-react-in-angular/src/favicon.ico rename to apps/directives-and-pipes/pure-pipe/src/favicon.ico diff --git a/apps/angular/8-pure-pipe/src/index.html b/apps/directives-and-pipes/pure-pipe/src/index.html similarity index 100% rename from apps/angular/8-pure-pipe/src/index.html rename to apps/directives-and-pipes/pure-pipe/src/index.html diff --git a/apps/angular/33-decoupling-components/src/main.ts b/apps/directives-and-pipes/pure-pipe/src/main.ts similarity index 100% rename from apps/angular/33-decoupling-components/src/main.ts rename to apps/directives-and-pipes/pure-pipe/src/main.ts diff --git a/apps/angular/4-typed-context-outlet/src/polyfills.ts b/apps/directives-and-pipes/pure-pipe/src/polyfills.ts similarity index 100% rename from apps/angular/4-typed-context-outlet/src/polyfills.ts rename to apps/directives-and-pipes/pure-pipe/src/polyfills.ts diff --git a/apps/angular/13-highly-customizable-css/src/styles.scss b/apps/directives-and-pipes/pure-pipe/src/styles.scss similarity index 100% rename from apps/angular/13-highly-customizable-css/src/styles.scss rename to apps/directives-and-pipes/pure-pipe/src/styles.scss diff --git a/apps/angular/1-projection/tsconfig.app.json b/apps/directives-and-pipes/pure-pipe/tsconfig.app.json similarity index 85% rename from apps/angular/1-projection/tsconfig.app.json rename to apps/directives-and-pipes/pure-pipe/tsconfig.app.json index 2a1ca1b8d..d576a6fb8 100644 --- a/apps/angular/1-projection/tsconfig.app.json +++ b/apps/directives-and-pipes/pure-pipe/tsconfig.app.json @@ -7,7 +7,8 @@ "useDefineForClassFields": false, "moduleResolution": "bundler" }, - "files": ["src/main.ts", "src/polyfills.ts"], + "files": [ + "src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] } diff --git a/apps/angular/4-typed-context-outlet/tsconfig.editor.json b/apps/directives-and-pipes/pure-pipe/tsconfig.editor.json similarity index 100% rename from apps/angular/4-typed-context-outlet/tsconfig.editor.json rename to apps/directives-and-pipes/pure-pipe/tsconfig.editor.json diff --git a/apps/angular/10-utility-wrapper-pipe/tsconfig.json b/apps/directives-and-pipes/pure-pipe/tsconfig.json similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/tsconfig.json rename to apps/directives-and-pipes/pure-pipe/tsconfig.json diff --git a/apps/angular/55-back-button-navigation/.eslintrc.json b/apps/directives-and-pipes/structural-directive/.eslintrc.json similarity index 100% rename from apps/angular/55-back-button-navigation/.eslintrc.json rename to apps/directives-and-pipes/structural-directive/.eslintrc.json diff --git a/apps/angular/6-structural-directive/README.md b/apps/directives-and-pipes/structural-directive/README.md similarity index 100% rename from apps/angular/6-structural-directive/README.md rename to apps/directives-and-pipes/structural-directive/README.md diff --git a/apps/angular/6-structural-directive/project.json b/apps/directives-and-pipes/structural-directive/project.json similarity index 100% rename from apps/angular/6-structural-directive/project.json rename to apps/directives-and-pipes/structural-directive/project.json diff --git a/apps/angular/6-structural-directive/src/app/app.component.ts b/apps/directives-and-pipes/structural-directive/src/app/app.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/app.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/app.component.ts diff --git a/apps/angular/6-structural-directive/src/app/app.config.ts b/apps/directives-and-pipes/structural-directive/src/app/app.config.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/app.config.ts rename to apps/directives-and-pipes/structural-directive/src/app/app.config.ts diff --git a/apps/angular/6-structural-directive/src/app/button.component.ts b/apps/directives-and-pipes/structural-directive/src/app/button.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/button.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/button.component.ts diff --git a/apps/angular/6-structural-directive/src/app/dashboard/admin.component.ts b/apps/directives-and-pipes/structural-directive/src/app/dashboard/admin.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/dashboard/admin.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/dashboard/admin.component.ts diff --git a/apps/angular/6-structural-directive/src/app/dashboard/manager.component.ts b/apps/directives-and-pipes/structural-directive/src/app/dashboard/manager.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/dashboard/manager.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/dashboard/manager.component.ts diff --git a/apps/angular/6-structural-directive/src/app/information.component.ts b/apps/directives-and-pipes/structural-directive/src/app/information.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/information.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/information.component.ts diff --git a/apps/angular/6-structural-directive/src/app/login.component.ts b/apps/directives-and-pipes/structural-directive/src/app/login.component.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/login.component.ts rename to apps/directives-and-pipes/structural-directive/src/app/login.component.ts diff --git a/apps/angular/6-structural-directive/src/app/routes.ts b/apps/directives-and-pipes/structural-directive/src/app/routes.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/routes.ts rename to apps/directives-and-pipes/structural-directive/src/app/routes.ts diff --git a/apps/angular/6-structural-directive/src/app/user.model.ts b/apps/directives-and-pipes/structural-directive/src/app/user.model.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/user.model.ts rename to apps/directives-and-pipes/structural-directive/src/app/user.model.ts diff --git a/apps/angular/6-structural-directive/src/app/user.store.ts b/apps/directives-and-pipes/structural-directive/src/app/user.store.ts similarity index 100% rename from apps/angular/6-structural-directive/src/app/user.store.ts rename to apps/directives-and-pipes/structural-directive/src/app/user.store.ts diff --git a/apps/angular/46-simple-animations/src/assets/.gitkeep b/apps/directives-and-pipes/structural-directive/src/assets/.gitkeep similarity index 100% rename from apps/angular/46-simple-animations/src/assets/.gitkeep rename to apps/directives-and-pipes/structural-directive/src/assets/.gitkeep diff --git a/apps/angular/46-simple-animations/src/favicon.ico b/apps/directives-and-pipes/structural-directive/src/favicon.ico similarity index 100% rename from apps/angular/46-simple-animations/src/favicon.ico rename to apps/directives-and-pipes/structural-directive/src/favicon.ico diff --git a/apps/angular/6-structural-directive/src/index.html b/apps/directives-and-pipes/structural-directive/src/index.html similarity index 100% rename from apps/angular/6-structural-directive/src/index.html rename to apps/directives-and-pipes/structural-directive/src/index.html diff --git a/apps/angular/21-anchor-navigation/src/main.ts b/apps/directives-and-pipes/structural-directive/src/main.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/main.ts rename to apps/directives-and-pipes/structural-directive/src/main.ts diff --git a/apps/angular/5-crud-application/src/polyfills.ts b/apps/directives-and-pipes/structural-directive/src/polyfills.ts similarity index 100% rename from apps/angular/5-crud-application/src/polyfills.ts rename to apps/directives-and-pipes/structural-directive/src/polyfills.ts diff --git a/apps/angular/52-lazy-load-component/src/styles.scss b/apps/directives-and-pipes/structural-directive/src/styles.scss similarity index 100% rename from apps/angular/52-lazy-load-component/src/styles.scss rename to apps/directives-and-pipes/structural-directive/src/styles.scss diff --git a/apps/angular/55-back-button-navigation/tailwind.config.js b/apps/directives-and-pipes/structural-directive/tailwind.config.js similarity index 100% rename from apps/angular/55-back-button-navigation/tailwind.config.js rename to apps/directives-and-pipes/structural-directive/tailwind.config.js diff --git a/apps/angular/5-crud-application/tsconfig.app.json b/apps/directives-and-pipes/structural-directive/tsconfig.app.json similarity index 85% rename from apps/angular/5-crud-application/tsconfig.app.json rename to apps/directives-and-pipes/structural-directive/tsconfig.app.json index 2a1ca1b8d..d576a6fb8 100644 --- a/apps/angular/5-crud-application/tsconfig.app.json +++ b/apps/directives-and-pipes/structural-directive/tsconfig.app.json @@ -7,7 +7,8 @@ "useDefineForClassFields": false, "moduleResolution": "bundler" }, - "files": ["src/main.ts", "src/polyfills.ts"], + "files": [ + "src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] } diff --git a/apps/angular/5-crud-application/tsconfig.editor.json b/apps/directives-and-pipes/structural-directive/tsconfig.editor.json similarity index 100% rename from apps/angular/5-crud-application/tsconfig.editor.json rename to apps/directives-and-pipes/structural-directive/tsconfig.editor.json diff --git a/apps/angular/4-typed-context-outlet/tsconfig.json b/apps/directives-and-pipes/structural-directive/tsconfig.json similarity index 100% rename from apps/angular/4-typed-context-outlet/tsconfig.json rename to apps/directives-and-pipes/structural-directive/tsconfig.json diff --git a/apps/angular/57-content-projection-default/.eslintrc.json b/apps/directives-and-pipes/utility-wrapper-pipe/.eslintrc.json similarity index 100% rename from apps/angular/57-content-projection-default/.eslintrc.json rename to apps/directives-and-pipes/utility-wrapper-pipe/.eslintrc.json diff --git a/apps/angular/10-utility-wrapper-pipe/README.md b/apps/directives-and-pipes/utility-wrapper-pipe/README.md similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/README.md rename to apps/directives-and-pipes/utility-wrapper-pipe/README.md diff --git a/apps/angular/10-utility-wrapper-pipe/project.json b/apps/directives-and-pipes/utility-wrapper-pipe/project.json similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/project.json rename to apps/directives-and-pipes/utility-wrapper-pipe/project.json diff --git a/apps/angular/10-utility-wrapper-pipe/src/app/app.component.ts b/apps/directives-and-pipes/utility-wrapper-pipe/src/app/app.component.ts similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/app/app.component.ts rename to apps/directives-and-pipes/utility-wrapper-pipe/src/app/app.component.ts diff --git a/apps/angular/10-utility-wrapper-pipe/src/app/person.utils.ts b/apps/directives-and-pipes/utility-wrapper-pipe/src/app/person.utils.ts similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/app/person.utils.ts rename to apps/directives-and-pipes/utility-wrapper-pipe/src/app/person.utils.ts diff --git a/apps/angular/5-crud-application/src/assets/.gitkeep b/apps/directives-and-pipes/utility-wrapper-pipe/src/assets/.gitkeep similarity index 100% rename from apps/angular/5-crud-application/src/assets/.gitkeep rename to apps/directives-and-pipes/utility-wrapper-pipe/src/assets/.gitkeep diff --git a/apps/angular/5-crud-application/src/favicon.ico b/apps/directives-and-pipes/utility-wrapper-pipe/src/favicon.ico similarity index 100% rename from apps/angular/5-crud-application/src/favicon.ico rename to apps/directives-and-pipes/utility-wrapper-pipe/src/favicon.ico diff --git a/apps/angular/10-utility-wrapper-pipe/src/index.html b/apps/directives-and-pipes/utility-wrapper-pipe/src/index.html similarity index 100% rename from apps/angular/10-utility-wrapper-pipe/src/index.html rename to apps/directives-and-pipes/utility-wrapper-pipe/src/index.html diff --git a/apps/angular/4-typed-context-outlet/src/main.ts b/apps/directives-and-pipes/utility-wrapper-pipe/src/main.ts similarity index 100% rename from apps/angular/4-typed-context-outlet/src/main.ts rename to apps/directives-and-pipes/utility-wrapper-pipe/src/main.ts diff --git a/apps/angular/6-structural-directive/src/polyfills.ts b/apps/directives-and-pipes/utility-wrapper-pipe/src/polyfills.ts similarity index 100% rename from apps/angular/6-structural-directive/src/polyfills.ts rename to apps/directives-and-pipes/utility-wrapper-pipe/src/polyfills.ts diff --git a/apps/angular/22-router-input/src/styles.scss b/apps/directives-and-pipes/utility-wrapper-pipe/src/styles.scss similarity index 100% rename from apps/angular/22-router-input/src/styles.scss rename to apps/directives-and-pipes/utility-wrapper-pipe/src/styles.scss diff --git a/apps/angular/10-utility-wrapper-pipe/tsconfig.app.json b/apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.app.json similarity index 85% rename from apps/angular/10-utility-wrapper-pipe/tsconfig.app.json rename to apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.app.json index 2a1ca1b8d..d576a6fb8 100644 --- a/apps/angular/10-utility-wrapper-pipe/tsconfig.app.json +++ b/apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.app.json @@ -7,7 +7,8 @@ "useDefineForClassFields": false, "moduleResolution": "bundler" }, - "files": ["src/main.ts", "src/polyfills.ts"], + "files": [ + "src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] } diff --git a/apps/angular/6-structural-directive/tsconfig.editor.json b/apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.editor.json similarity index 100% rename from apps/angular/6-structural-directive/tsconfig.editor.json rename to apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.editor.json diff --git a/apps/angular/6-structural-directive/tsconfig.json b/apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.json similarity index 100% rename from apps/angular/6-structural-directive/tsconfig.json rename to apps/directives-and-pipes/utility-wrapper-pipe/tsconfig.json diff --git a/apps/angular/58-content-projection-condition/.eslintrc.json b/apps/directives-and-pipes/wrap-function-pipe/.eslintrc.json similarity index 100% rename from apps/angular/58-content-projection-condition/.eslintrc.json rename to apps/directives-and-pipes/wrap-function-pipe/.eslintrc.json diff --git a/apps/angular/9-wrap-function-pipe/README.md b/apps/directives-and-pipes/wrap-function-pipe/README.md similarity index 100% rename from apps/angular/9-wrap-function-pipe/README.md rename to apps/directives-and-pipes/wrap-function-pipe/README.md diff --git a/apps/angular/9-wrap-function-pipe/project.json b/apps/directives-and-pipes/wrap-function-pipe/project.json similarity index 100% rename from apps/angular/9-wrap-function-pipe/project.json rename to apps/directives-and-pipes/wrap-function-pipe/project.json diff --git a/apps/angular/9-wrap-function-pipe/src/app/app.component.ts b/apps/directives-and-pipes/wrap-function-pipe/src/app/app.component.ts similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/app/app.component.ts rename to apps/directives-and-pipes/wrap-function-pipe/src/app/app.component.ts diff --git a/apps/angular/52-lazy-load-component/src/assets/.gitkeep b/apps/directives-and-pipes/wrap-function-pipe/src/assets/.gitkeep similarity index 100% rename from apps/angular/52-lazy-load-component/src/assets/.gitkeep rename to apps/directives-and-pipes/wrap-function-pipe/src/assets/.gitkeep diff --git a/apps/angular/52-lazy-load-component/src/favicon.ico b/apps/directives-and-pipes/wrap-function-pipe/src/favicon.ico similarity index 100% rename from apps/angular/52-lazy-load-component/src/favicon.ico rename to apps/directives-and-pipes/wrap-function-pipe/src/favicon.ico diff --git a/apps/angular/9-wrap-function-pipe/src/index.html b/apps/directives-and-pipes/wrap-function-pipe/src/index.html similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/index.html rename to apps/directives-and-pipes/wrap-function-pipe/src/index.html diff --git a/apps/angular/8-pure-pipe/src/main.ts b/apps/directives-and-pipes/wrap-function-pipe/src/main.ts similarity index 100% rename from apps/angular/8-pure-pipe/src/main.ts rename to apps/directives-and-pipes/wrap-function-pipe/src/main.ts diff --git a/apps/angular/8-pure-pipe/src/polyfills.ts b/apps/directives-and-pipes/wrap-function-pipe/src/polyfills.ts similarity index 100% rename from apps/angular/8-pure-pipe/src/polyfills.ts rename to apps/directives-and-pipes/wrap-function-pipe/src/polyfills.ts diff --git a/apps/angular/4-typed-context-outlet/src/styles.scss b/apps/directives-and-pipes/wrap-function-pipe/src/styles.scss similarity index 100% rename from apps/angular/4-typed-context-outlet/src/styles.scss rename to apps/directives-and-pipes/wrap-function-pipe/src/styles.scss diff --git a/apps/angular/4-typed-context-outlet/tsconfig.app.json b/apps/directives-and-pipes/wrap-function-pipe/tsconfig.app.json similarity index 85% rename from apps/angular/4-typed-context-outlet/tsconfig.app.json rename to apps/directives-and-pipes/wrap-function-pipe/tsconfig.app.json index 2a1ca1b8d..d576a6fb8 100644 --- a/apps/angular/4-typed-context-outlet/tsconfig.app.json +++ b/apps/directives-and-pipes/wrap-function-pipe/tsconfig.app.json @@ -7,7 +7,8 @@ "useDefineForClassFields": false, "moduleResolution": "bundler" }, - "files": ["src/main.ts", "src/polyfills.ts"], + "files": [ + "src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"], "exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"] } diff --git a/apps/angular/8-pure-pipe/tsconfig.editor.json b/apps/directives-and-pipes/wrap-function-pipe/tsconfig.editor.json similarity index 100% rename from apps/angular/8-pure-pipe/tsconfig.editor.json rename to apps/directives-and-pipes/wrap-function-pipe/tsconfig.editor.json diff --git a/apps/angular/8-pure-pipe/tsconfig.json b/apps/directives-and-pipes/wrap-function-pipe/tsconfig.json similarity index 100% rename from apps/angular/8-pure-pipe/tsconfig.json rename to apps/directives-and-pipes/wrap-function-pipe/tsconfig.json diff --git a/apps/forms/41-control-value-accessor/tsconfig.app.json b/apps/forms/41-control-value-accessor/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/forms/41-control-value-accessor/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/forms/41-control-value-accessor/tsconfig.json b/apps/forms/41-control-value-accessor/tsconfig.json deleted file mode 100644 index 25ca437b4..000000000 --- a/apps/forms/41-control-value-accessor/tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/forms/48-avoid-losing-form-data/tsconfig.app.json b/apps/forms/48-avoid-losing-form-data/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/forms/48-avoid-losing-form-data/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/angular/6-structural-directive/.eslintrc.json b/apps/forms/avoid-losing-form-data/.eslintrc.json similarity index 100% rename from apps/angular/6-structural-directive/.eslintrc.json rename to apps/forms/avoid-losing-form-data/.eslintrc.json diff --git a/apps/forms/48-avoid-losing-form-data/README.md b/apps/forms/avoid-losing-form-data/README.md similarity index 100% rename from apps/forms/48-avoid-losing-form-data/README.md rename to apps/forms/avoid-losing-form-data/README.md diff --git a/apps/forms/48-avoid-losing-form-data/project.json b/apps/forms/avoid-losing-form-data/project.json similarity index 100% rename from apps/forms/48-avoid-losing-form-data/project.json rename to apps/forms/avoid-losing-form-data/project.json diff --git a/apps/forms/48-avoid-losing-form-data/src/app/app.component.ts b/apps/forms/avoid-losing-form-data/src/app/app.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/app.component.ts rename to apps/forms/avoid-losing-form-data/src/app/app.component.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/app.config.ts b/apps/forms/avoid-losing-form-data/src/app/app.config.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/app.config.ts rename to apps/forms/avoid-losing-form-data/src/app/app.config.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/app.routes.ts b/apps/forms/avoid-losing-form-data/src/app/app.routes.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/app.routes.ts rename to apps/forms/avoid-losing-form-data/src/app/app.routes.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/pages/join.component.ts b/apps/forms/avoid-losing-form-data/src/app/pages/join.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/pages/join.component.ts rename to apps/forms/avoid-losing-form-data/src/app/pages/join.component.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/pages/page.component.ts b/apps/forms/avoid-losing-form-data/src/app/pages/page.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/pages/page.component.ts rename to apps/forms/avoid-losing-form-data/src/app/pages/page.component.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/ui/dialog.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/dialog.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/ui/dialog.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/dialog.component.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/ui/form.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/form.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/ui/form.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/form.component.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/app/ui/nav.component.ts b/apps/forms/avoid-losing-form-data/src/app/ui/nav.component.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/app/ui/nav.component.ts rename to apps/forms/avoid-losing-form-data/src/app/ui/nav.component.ts diff --git a/apps/angular/6-structural-directive/src/assets/.gitkeep b/apps/forms/avoid-losing-form-data/src/assets/.gitkeep similarity index 100% rename from apps/angular/6-structural-directive/src/assets/.gitkeep rename to apps/forms/avoid-losing-form-data/src/assets/.gitkeep diff --git a/apps/angular/57-content-projection-default/public/favicon.ico b/apps/forms/avoid-losing-form-data/src/favicon.ico similarity index 100% rename from apps/angular/57-content-projection-default/public/favicon.ico rename to apps/forms/avoid-losing-form-data/src/favicon.ico diff --git a/apps/forms/48-avoid-losing-form-data/src/index.html b/apps/forms/avoid-losing-form-data/src/index.html similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/index.html rename to apps/forms/avoid-losing-form-data/src/index.html diff --git a/apps/angular/57-content-projection-default/src/main.ts b/apps/forms/avoid-losing-form-data/src/main.ts similarity index 100% rename from apps/angular/57-content-projection-default/src/main.ts rename to apps/forms/avoid-losing-form-data/src/main.ts diff --git a/apps/angular/57-content-projection-default/src/styles.scss b/apps/forms/avoid-losing-form-data/src/styles.scss similarity index 100% rename from apps/angular/57-content-projection-default/src/styles.scss rename to apps/forms/avoid-losing-form-data/src/styles.scss diff --git a/apps/forms/48-avoid-losing-form-data/tailwind.config.js b/apps/forms/avoid-losing-form-data/tailwind.config.js similarity index 100% rename from apps/forms/48-avoid-losing-form-data/tailwind.config.js rename to apps/forms/avoid-losing-form-data/tailwind.config.js diff --git a/apps/angular/16-master-dependency-injection/tsconfig.app.json b/apps/forms/avoid-losing-form-data/tsconfig.app.json similarity index 100% rename from apps/angular/16-master-dependency-injection/tsconfig.app.json rename to apps/forms/avoid-losing-form-data/tsconfig.app.json diff --git a/apps/angular/55-back-button-navigation/tsconfig.editor.json b/apps/forms/avoid-losing-form-data/tsconfig.editor.json similarity index 100% rename from apps/angular/55-back-button-navigation/tsconfig.editor.json rename to apps/forms/avoid-losing-form-data/tsconfig.editor.json diff --git a/apps/forms/48-avoid-losing-form-data/tsconfig.json b/apps/forms/avoid-losing-form-data/tsconfig.json similarity index 100% rename from apps/forms/48-avoid-losing-form-data/tsconfig.json rename to apps/forms/avoid-losing-form-data/tsconfig.json diff --git a/apps/angular/60-async-redirect/.eslintrc.json b/apps/forms/control-value-accessor/.eslintrc.json similarity index 100% rename from apps/angular/60-async-redirect/.eslintrc.json rename to apps/forms/control-value-accessor/.eslintrc.json diff --git a/apps/forms/41-control-value-accessor/README.md b/apps/forms/control-value-accessor/README.md similarity index 100% rename from apps/forms/41-control-value-accessor/README.md rename to apps/forms/control-value-accessor/README.md diff --git a/apps/forms/41-control-value-accessor/jest.config.ts b/apps/forms/control-value-accessor/jest.config.ts similarity index 100% rename from apps/forms/41-control-value-accessor/jest.config.ts rename to apps/forms/control-value-accessor/jest.config.ts diff --git a/apps/forms/41-control-value-accessor/project.json b/apps/forms/control-value-accessor/project.json similarity index 100% rename from apps/forms/41-control-value-accessor/project.json rename to apps/forms/control-value-accessor/project.json diff --git a/apps/forms/41-control-value-accessor/src/app/app.component.ts b/apps/forms/control-value-accessor/src/app/app.component.ts similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/app.component.ts rename to apps/forms/control-value-accessor/src/app/app.component.ts diff --git a/apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.html b/apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.html similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.html rename to apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.html diff --git a/apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.scss b/apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.scss similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.scss rename to apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.scss diff --git a/apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.ts b/apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.ts similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/feedback-form/feedback-form.component.ts rename to apps/forms/control-value-accessor/src/app/feedback-form/feedback-form.component.ts diff --git a/apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.html b/apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.html similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.html rename to apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.html diff --git a/apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.scss b/apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.scss similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.scss rename to apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.scss diff --git a/apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.ts b/apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.ts similarity index 100% rename from apps/forms/41-control-value-accessor/src/app/rating-control/rating-control.component.ts rename to apps/forms/control-value-accessor/src/app/rating-control/rating-control.component.ts diff --git a/apps/angular/8-pure-pipe/src/assets/.gitkeep b/apps/forms/control-value-accessor/src/assets/.gitkeep similarity index 100% rename from apps/angular/8-pure-pipe/src/assets/.gitkeep rename to apps/forms/control-value-accessor/src/assets/.gitkeep diff --git a/apps/angular/58-content-projection-condition/public/favicon.ico b/apps/forms/control-value-accessor/src/favicon.ico similarity index 100% rename from apps/angular/58-content-projection-condition/public/favicon.ico rename to apps/forms/control-value-accessor/src/favicon.ico diff --git a/apps/forms/41-control-value-accessor/src/index.html b/apps/forms/control-value-accessor/src/index.html similarity index 100% rename from apps/forms/41-control-value-accessor/src/index.html rename to apps/forms/control-value-accessor/src/index.html diff --git a/apps/angular/9-wrap-function-pipe/src/main.ts b/apps/forms/control-value-accessor/src/main.ts similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/main.ts rename to apps/forms/control-value-accessor/src/main.ts diff --git a/apps/angular/58-content-projection-condition/src/styles.scss b/apps/forms/control-value-accessor/src/styles.scss similarity index 100% rename from apps/angular/58-content-projection-condition/src/styles.scss rename to apps/forms/control-value-accessor/src/styles.scss diff --git a/apps/angular/52-lazy-load-component/src/test-setup.ts b/apps/forms/control-value-accessor/src/test-setup.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/test-setup.ts rename to apps/forms/control-value-accessor/src/test-setup.ts diff --git a/apps/angular/57-content-projection-default/tailwind.config.js b/apps/forms/control-value-accessor/tailwind.config.js similarity index 100% rename from apps/angular/57-content-projection-default/tailwind.config.js rename to apps/forms/control-value-accessor/tailwind.config.js diff --git a/apps/angular/21-anchor-navigation/tsconfig.app.json b/apps/forms/control-value-accessor/tsconfig.app.json similarity index 100% rename from apps/angular/21-anchor-navigation/tsconfig.app.json rename to apps/forms/control-value-accessor/tsconfig.app.json diff --git a/apps/angular/46-simple-animations/tsconfig.editor.json b/apps/forms/control-value-accessor/tsconfig.editor.json similarity index 100% rename from apps/angular/46-simple-animations/tsconfig.editor.json rename to apps/forms/control-value-accessor/tsconfig.editor.json diff --git a/apps/angular/46-simple-animations/tsconfig.json b/apps/forms/control-value-accessor/tsconfig.json similarity index 100% rename from apps/angular/46-simple-animations/tsconfig.json rename to apps/forms/control-value-accessor/tsconfig.json diff --git a/apps/angular/45-react-in-angular/tsconfig.spec.json b/apps/forms/control-value-accessor/tsconfig.spec.json similarity index 100% rename from apps/angular/45-react-in-angular/tsconfig.spec.json rename to apps/forms/control-value-accessor/tsconfig.spec.json diff --git a/apps/forms/lecture/advanced.md b/apps/forms/lecture/advanced.md new file mode 100644 index 000000000..e235dc5ba --- /dev/null +++ b/apps/forms/lecture/advanced.md @@ -0,0 +1 @@ +soon diff --git a/apps/forms/lecture/basics.md b/apps/forms/lecture/basics.md new file mode 100644 index 000000000..be26bd054 --- /dev/null +++ b/apps/forms/lecture/basics.md @@ -0,0 +1,338 @@ +## Template driven forms +Это подход при котором логика формы, типы контролов, валидаторы и тд описываются в шаблоне, практически без использования TypeScript. Возьмем пример + +```typescript +import { Component } from '@angular/core'; +import { FormsModule, NgForm } from '@angular/forms'; + +@Component({ + selector: 'login', + styles: ` + input { + border: 1px solid #ddd; + padding: 5px 15px; + border-radius: 5px; + display: block; + margin-bottom: 5px; + } + + .error { + font-size: 12px; + color: red; + } + `, + standalone: true, + imports: [FormsModule], + template: ` +
+ + @if (emailField.invalid && emailField.touched) { +

Введите корректный email

+ } + + + + +
+ `, +}) +export class LoginComponent { + model = { email: '', password: '' }; + + onSubmit(form: NgForm) { + if (form.valid) { + console.log(form.value); // { email: '...', password: '...' } + } + } +} + +``` + +Здесь нужно обратить внимание на следующее: +1. Доступ к форме у нас происходит через шаблонную переменную `#form` +2. Доступ к форм-контролам у на спроисходит так же, через шаблонные переменные, например `emailField`. Таким образом можно получать статус валидности контрола, ошибки и тд +3. Атрибут name на форм-контроле обязатален - Angular использует его как ключ в объекте формы. +4. Правила валидации каждого форм-контрола мы указываем как атрибут dom-элемента. Например на контроле пароля это required и minLength, а на контроле почты - это email. Ангуляр под капотом автоматически навешивает стандартные функции валидации +Такой подход хорош для простых форм. Простых как по структуре так и по логике. Но когда все становится сложнее, то такими формами крайне недобно управлять, расширять их, обвешивать всякой доп. логикой. Например при таком подходе будет крайне неудобно программно установить значение в контрол. Это в принципе возможно сделать, через viewChild, но придется писать много кода, по сути не особо то нужного. Плюсом к этому, чтобы получить контрол через viewChild вам сначала нужно дождаться полного рендера формы, соотв ДО рендера, ничего сделать не получится, а часто это нужно. + +Чтобы убедиться в хрупкости такого подхода, вот вам задача: +1. После инициализации формы, нужно выждать 3 секунды и установить в контрол почты значение `lazy-value@mymail.ru` +## Reactive forms +Реактивный подход к построению форм немного другой: сначала описываешь в TS структуру формы, правила валидации а потом к этой форме и форм-контролам привязываешь дом-элементы. + +Angular предоставляет три класса для построения модели формы. Все они наследуются от `AbstractControl`: + + +``` +AbstractControl +├── FormControl — одно поле +├── FormGroup — группа полей (объект) +└── FormArray — массив полей +``` + +Думайте об этом как о структуре данных: `FormGroup` — это объект, `FormArray` — массив, `FormControl` — примитив. Любую форму можно описать их комбинацией. + +### FormGroup & FormControl +1. Описываем форму через классы FormGroup и FormControl +2. Привязываем форм-контролы к дом-элементам через директивы formGroup и formControlName + +```typescript +import { Component } from '@angular/core'; +import { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms'; + +@Component({ + selector: 'app-reactive-login', + standalone: true, + imports: [ReactiveFormsModule], + template: ` +
+ + + +
+ ` +}) +export class ReactiveLoginComponent { + form = new FormGroup({ + email: new FormControl('', [Validators.required, Validators.email]), + password: new FormControl('', [Validators.required, Validators.minLength(8)]), + }); + + // Геттеры — чтобы не писать this.form.controls.email везде + get email() { return this.form.controls.email; } + get password() { return this.form.controls.password; } + + onSubmit() { + if (this.form.valid) { + console.log(this.form.value); + // { email: 'user@example.com', password: 'secret123' } + } + } +} +``` + +Если сравнить с прошлым подходом, то видно что из HTML ушло много лишней информации, стало поменьше магии. Теперь у нас остались просто привязки контролов к дом-элементам. Плюс ко всему мы можем сконфигурировать форму и менять ее ДО рендеринга HTML, что было невозможно в подходе Template driven. + +Валидаторы больше не описываются в HTML, они описываются функциями в TS. + +До v14 значения форм было нетипизированным и это доставляло много проблем, начиная с Angular v14 эту проблему исправили и теперь крайне рекомендуется типизировать значения форм-контролов + +```ts +const form = new FormGroup({ + age: new FormControl(0), + name: new FormControl(''), +}); +``` + + + +### FormArray +Часто бывают случаи, когда набор вашей формы меняется пользователем в рантайме. Например когда пользователь указывает несколько телефонов для связи. Если при таком кейсе использовать FormGroup то пришлось бы как то вручную управлять добавлением контролов в группу, удалением их оттуда и тд. Можно, но неэффективно и неудобно. Для таких задач существует FormArray + +```ts +@Component({ + template: ` +
+
+ @for (phone of phones.controls; track $index) { +
+ + +
+ } +
+ +
+ ` +}) +export class ContactFormComponent { + form = new FormGroup({ + name: ['', Validators.required], + phones: new FormArray([new FormControl('')]), + }); + + get phones() { + return this.form.controls.phones; + } + + addPhone() { + this.phones.push(new FormControl('')); + } + + removePhone(index: number) { + this.phones.removeAt(index); + } +} +``` + +Обратите внимание: в шаблоне `formArrayName="phones"` указывает Angular где искать массив, а `[formControlName]="i"` — привязка по числовому индексу, а не по имени. +У FormArray для управления коллекцией уже есть встроенные методы: +- push +- removeAt +- insert +Следует использовать именно их, для добавления или удаления контролов + +## Обработка значения контролов и формы +Так как и FormControl и FormGroup унаследованы от класса AbstractControl то АПИ по работе со значениями одинаков: +- setValue() - установка нового значения +- patchValue() - установка значения конкретного поля формы +- reset() - сброс значения формы +Как правило вы будете устанавливать значения конкретьного контрола через форму, а не напрямую через конкретный FormControl. Например вернемся к нашей прошлой форме логина +```ts +form = new FormGroup({ + email: new FormControl('', [Validators.required, Validators.email]), + password: new FormControl('', [Validators.required, Validators.minLength(8)]), + }); + +form.setValue({ email: 'a@b.com', password: '123' }); +form.patchValue({ email: 'a@b.com' }); +``` + +- `setValue` требует передать значения для **всех** полей группы, иначе выбросит ошибку. +- `patchValue` обновляет только те поля, которые вы передали. На практике `patchValue` используется чаще — например, когда вы заполняете форму данными с сервера, где могут быть не все поля. +Одно из самых главных преимуществ реактивного построения форм - это подписка на изменения контролов. Реактивные формы — это Observable. Каждый `FormControl` и `FormGroup` предоставляет два потока: `valueChanges` и `statusChanges`. Вы можете подписаться на них и реагировать на любые изменения. +```typescript +// Реагируем на изменение конкретного поля +this.form.controls.email.valueChanges.subscribe(value => { + console.log('email changed:', value); +}); + +// Реагируем на любое изменение в форме +this.form.valueChanges.subscribe(formValue => { + console.log('form changed:', formValue); +}); + +// Реагируем на изменение статуса (valid/invalid/pending) +this.form.statusChanges.subscribe(status => { + // 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED' +}); +``` + +Раз у нас valueChanges это поток (Observable) то мы можем использовать весь арсенал RxJS-операторов для обработки: фильтровать (filter), комбинировать значения вместе (combineLatest) и тд, в зав-ти от задачи + +## Валидация +Angular предоставляет набор готовых валидаторов в классе `Validators`: + +```typescript +import { Validators } from '@angular/forms'; + +Validators.required // поле не должно быть пустым +Validators.email // валидный email +Validators.minLength(n) // минимальная длина строки +Validators.maxLength(n) // максимальная длина строки +Validators.min(n) // минимальное числовое значение +Validators.max(n) // максимальное числовое значение +Validators.pattern(regexp) // соответствие регулярному выражению +Validators.nullValidator // всегда валидно (заглушка) +``` + +Несколько валидаторов передаются массивом — Angular применяет их все и объединяет ошибки: + +```typescript +new FormControl('', [Validators.required, Validators.email, Validators.maxLength(100)]) +``` + +Встроенных валидаторов часто недостаточно, но в Ангуляре можно создать свой валидатор очень просто. Это обычная функция с чётко определённой сигнатурой. + +Валидатор принимает `AbstractControl` и возвращает либо объект с ошибками, либо `null` если всё хорошо. Ключи объекта ошибок — это то, что вы будете проверять через `ctrl.errors?.['ERROR_KEY']`. + +```typescript +import { AbstractControl, ValidationErrors } from '@angular/forms'; + +// Простой валидатор-функция +function noSpaces(control: AbstractControl): ValidationErrors | null { + if (control.value?.includes(' ')) { + return { noSpaces: true }; // ключ ошибки - noSpaces + } + return null; // всё хорошо, значение валидно +} + +// Валидатор-фабрика — принимает параметры и возвращает функцию-валидатор +function forbiddenValue(forbidden: string) { + return (control: AbstractControl): ValidationErrors | null => { + if (control.value === forbidden) { + return { forbiddenValue: { value: control.value } }; + } + return null; + }; +} + +// Использование +const ctrl = new FormControl('', [ + Validators.required, + noSpaces, + forbiddenValue('admin'), +]); +``` + +Заметьте разницу: `noSpaces` передаётся как ссылка на функцию, а `forbiddenValue('admin')` — вызывается и возвращает функцию. Это стандартный паттерн: когда валидатору нужны параметры, он реализуется как фабрика. +## Статусы формы и контролов +Каждый `FormControl` — это не просто хранилище значения. Это полноценный объект состояния, который отслеживает историю взаимодействия пользователя с полем. + +```typescript +const ctrl = new FormControl(''); + +// Статус валидации +ctrl.valid // true если все валидаторы прошли +ctrl.invalid // !valid +ctrl.pending // true если асинхронный валидатор ещё работает +ctrl.disabled // поле отключено + +// История взаимодействия +ctrl.pristine // пользователь ещё ни разу не менял значение +ctrl.dirty // пользователь хоть раз изменил значение +ctrl.touched // пользователь покинул поле (сработал blur) +ctrl.untouched + +// Данные +ctrl.value // текущее значение +ctrl.errors // { required: true } | null +``` + +Зачем нам нужны `touched` и `dirty`? Представьте: пользователь только что открыл форму. Все поля пустые — значит, `required` сразу показывает ошибки. Но показывать ошибки до того, как пользователь вообще попытался что-то заполнить — плохой UX. Поэтому стандартный паттерн: показывать ошибки только после `touched` (пользователь посетил поле и ушёл). + +Как используется: +```html +@if (email.invalid && email.touched) { +
Введите корректный email
+} + + +@if (email.invalid) { +
Введите корректный email
+} +``` + +Но это еще не всё! Angular автоматически добавляет и убирает CSS-классы на элементе формы, отражая его состояние. Вам не нужно делать это вручную: + +``` +ng-valid / ng-invalid +ng-pristine / ng-dirty +ng-touched / ng-untouched +``` + +Это позволяет стилизовать поля декларативно: + +```css +/* Красная рамка только на полях, которые пользователь тронул и заполнил неверно */ +input.ng-invalid.ng-touched { + border-color: red; +} + +/* Зелёная рамка для корректно заполненных полей */ +input.ng-valid.ng-dirty { + border-color: green; +} +``` diff --git a/apps/nx/42-static-vs-dynamic-import/README.md b/apps/nx/42-static-vs-dynamic-import/README.md deleted file mode 100644 index a08abaa82..000000000 --- a/apps/nx/42-static-vs-dynamic-import/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Static vs Dynamic Import - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve nx-static-vs-dynamic-import -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/nx/42-static-dynamic-import/). diff --git a/apps/nx/42-static-vs-dynamic-import/project.json b/apps/nx/42-static-vs-dynamic-import/project.json deleted file mode 100644 index 68332bbc6..000000000 --- a/apps/nx/42-static-vs-dynamic-import/project.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "nx-static-vs-dynamic-import", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/nx/42-static-vs-dynamic-import/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/nx/42-static-vs-dynamic-import", - "index": "apps/nx/42-static-vs-dynamic-import/src/index.html", - "browser": "apps/nx/42-static-vs-dynamic-import/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/nx/42-static-vs-dynamic-import/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/nx/42-static-vs-dynamic-import/src/favicon.ico", - "apps/nx/42-static-vs-dynamic-import/src/assets" - ], - "styles": [ - "apps/nx/42-static-vs-dynamic-import/src/styles.scss", - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all", - "sourceMap": true - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "nx-static-vs-dynamic-import:build:production" - }, - "development": { - "buildTarget": "nx-static-vs-dynamic-import:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "nx-static-vs-dynamic-import:build" - } - } - } -} diff --git a/apps/nx/42-static-vs-dynamic-import/src/app/app.component.ts b/apps/nx/42-static-vs-dynamic-import/src/app/app.component.ts deleted file mode 100644 index 59be617e8..000000000 --- a/apps/nx/42-static-vs-dynamic-import/src/app/app.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { - UserComponent, - type User, -} from '@angular-challenges/static-dynamic-import/users'; -import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; - -@Component({ - imports: [UserComponent, RouterOutlet], - selector: 'app-root', - template: ` - Author: - - - `, - host: { - class: 'flex flex-col', - }, -}) -export class AppComponent { - author: User = { - name: 'Thomas', - lastName: 'Laforge', - country: 'France', - }; -} diff --git a/apps/nx/42-static-vs-dynamic-import/src/app/app.config.ts b/apps/nx/42-static-vs-dynamic-import/src/app/app.config.ts deleted file mode 100644 index 6525263a3..000000000 --- a/apps/nx/42-static-vs-dynamic-import/src/app/app.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; -import { provideRouter } from '@angular/router'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideAnimations(), - provideRouter([ - { - path: '', - loadComponent: () => - import('@angular-challenges/static-dynamic-import/users'), - }, - ]), - ], -}; diff --git a/apps/nx/42-static-vs-dynamic-import/src/index.html b/apps/nx/42-static-vs-dynamic-import/src/index.html deleted file mode 100644 index 1b4f2a84b..000000000 --- a/apps/nx/42-static-vs-dynamic-import/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - nx-static-vs-dynamic-import - - - - - - - - - diff --git a/apps/nx/42-static-vs-dynamic-import/tsconfig.app.json b/apps/nx/42-static-vs-dynamic-import/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/nx/42-static-vs-dynamic-import/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/12-optimize-change-detection/src/styles.scss b/apps/performance/12-optimize-change-detection/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/performance/12-optimize-change-detection/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/performance/12-optimize-change-detection/tsconfig.app.json b/apps/performance/12-optimize-change-detection/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/12-optimize-change-detection/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/34-default-vs-onpush/tsconfig.app.json b/apps/performance/34-default-vs-onpush/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/34-default-vs-onpush/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/34-default-vs-onpush/tsconfig.json b/apps/performance/34-default-vs-onpush/tsconfig.json deleted file mode 100644 index 51c7908c5..000000000 --- a/apps/performance/34-default-vs-onpush/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/performance/35-memoization/tsconfig.app.json b/apps/performance/35-memoization/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/35-memoization/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/35-memoization/tsconfig.editor.json b/apps/performance/35-memoization/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/performance/35-memoization/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/performance/35-memoization/tsconfig.json b/apps/performance/35-memoization/tsconfig.json deleted file mode 100644 index 51c7908c5..000000000 --- a/apps/performance/35-memoization/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/performance/36-ngfor-optimization/.eslintrc.json b/apps/performance/36-ngfor-optimization/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/performance/36-ngfor-optimization/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/performance/36-ngfor-optimization/src/styles.scss b/apps/performance/36-ngfor-optimization/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/performance/36-ngfor-optimization/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/performance/36-ngfor-optimization/src/test-setup.ts b/apps/performance/36-ngfor-optimization/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/performance/36-ngfor-optimization/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/performance/36-ngfor-optimization/tsconfig.app.json b/apps/performance/36-ngfor-optimization/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/36-ngfor-optimization/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/37-optimize-big-list/.eslintrc.json b/apps/performance/37-optimize-big-list/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/performance/37-optimize-big-list/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/performance/37-optimize-big-list/README.md b/apps/performance/37-optimize-big-list/README.md deleted file mode 100644 index 1d8e134c2..000000000 --- a/apps/performance/37-optimize-big-list/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# NgFor optimize big list - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve performance-optimize-big-list -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/performance/37-ngfor-biglist/). diff --git a/apps/performance/37-optimize-big-list/project.json b/apps/performance/37-optimize-big-list/project.json deleted file mode 100644 index 3ecb24d36..000000000 --- a/apps/performance/37-optimize-big-list/project.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "performance-optimize-big-list", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/performance/37-optimize-big-list/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/performance/37-optimize-big-list", - "index": "apps/performance/37-optimize-big-list/src/index.html", - "main": "apps/performance/37-optimize-big-list/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/performance/37-optimize-big-list/tsconfig.app.json", - "assets": [ - "apps/performance/37-optimize-big-list/src/favicon.ico", - "apps/performance/37-optimize-big-list/src/assets" - ], - "styles": [ - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", - "apps/performance/37-optimize-big-list/src/styles.scss" - ], - "scripts": [], - "allowedCommonJsDependencies": ["seedrandom"] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "performance-optimize-big-list:build:production" - }, - "development": { - "buildTarget": "performance-optimize-big-list:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "performance-optimize-big-list:build" - } - } - } -} diff --git a/apps/performance/37-optimize-big-list/src/app/app.component.ts b/apps/performance/37-optimize-big-list/src/app/app.component.ts deleted file mode 100644 index a5f121b22..000000000 --- a/apps/performance/37-optimize-big-list/src/app/app.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component, signal } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { generateList } from './generateList'; -import { PersonService } from './list.service'; -import { PersonListComponent } from './person-list.component'; - -@Component({ - imports: [ - PersonListComponent, - FormsModule, - MatFormFieldModule, - MatInputModule, - ], - providers: [PersonService], - selector: 'app-root', - template: ` - - - @if (loadList()) { - - } - `, - host: { - class: 'flex items-center flex-col gap-5', - }, -}) -export class AppComponent { - readonly persons = signal(generateList()); - readonly loadList = signal(false); - - label = ''; -} diff --git a/apps/performance/37-optimize-big-list/src/app/app.config.ts b/apps/performance/37-optimize-big-list/src/app/app.config.ts deleted file mode 100644 index 59198e627..000000000 --- a/apps/performance/37-optimize-big-list/src/app/app.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; - -export const appConfig: ApplicationConfig = { - providers: [provideAnimations()], -}; diff --git a/apps/performance/37-optimize-big-list/src/app/generateList.ts b/apps/performance/37-optimize-big-list/src/app/generateList.ts deleted file mode 100644 index 96bfb3722..000000000 --- a/apps/performance/37-optimize-big-list/src/app/generateList.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { randEmail, randFirstName } from '@ngneat/falso'; -import { Person } from './person.model'; - -export function generateList() { - const arr: Person[] = []; - - for (let i = 0; i < 100000; i++) { - arr.push({ - email: randEmail(), - name: randFirstName(), - }); - } - - return arr; -} diff --git a/apps/performance/37-optimize-big-list/src/app/list.service.ts b/apps/performance/37-optimize-big-list/src/app/list.service.ts deleted file mode 100644 index 9a54824d1..000000000 --- a/apps/performance/37-optimize-big-list/src/app/list.service.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Injectable, inject, signal } from '@angular/core'; -import { randEmail, randFirstName } from '@ngneat/falso'; -import { generateList } from './generateList'; -import { Person } from './person.model'; - -@Injectable() -export class PersonService { - private readonly fakeBackend = inject(FakeBackendService); - readonly persons = signal([]); - - loadPersons() { - this.persons.set(generateList()); - } - - deletePerson(email: string) { - this.persons.set( - this.fakeBackend - .returnNewList(this.persons()) - .filter((p) => p.email !== email), - ); - } - - updatePerson(email: string) { - this.persons.set( - this.fakeBackend - .returnNewList(this.persons()) - .map((p) => (p.email === email ? { email, name: randFirstName() } : p)), - ); - } - - addPerson(name: string) { - this.persons.set([ - { email: randEmail(), name }, - ...this.fakeBackend.returnNewList(this.persons()), - ]); - } -} - -@Injectable({ providedIn: 'root' }) -export class FakeBackendService { - returnNewList = (input: Person[]): Person[] => [ - ...input.map((i) => ({ ...i })), - ]; -} diff --git a/apps/performance/37-optimize-big-list/src/app/person-list.component.ts b/apps/performance/37-optimize-big-list/src/app/person-list.component.ts deleted file mode 100644 index 049630476..000000000 --- a/apps/performance/37-optimize-big-list/src/app/person-list.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ChangeDetectionStrategy, Component, input } from '@angular/core'; -import { Person } from './person.model'; - -@Component({ - selector: 'app-person-list', - template: ` -
-
- @for (person of persons(); track person.email) { -
-

{{ person.name }}

-

{{ person.email }}

-
- } -
-
- `, - host: { - class: 'w-full flex flex-col', - }, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PersonListComponent { - persons = input(); -} diff --git a/apps/performance/37-optimize-big-list/src/app/person.model.ts b/apps/performance/37-optimize-big-list/src/app/person.model.ts deleted file mode 100644 index 0ccffbbf9..000000000 --- a/apps/performance/37-optimize-big-list/src/app/person.model.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Person { - email: string; - name: string; -} diff --git a/apps/performance/37-optimize-big-list/src/index.html b/apps/performance/37-optimize-big-list/src/index.html deleted file mode 100644 index f93d2d26f..000000000 --- a/apps/performance/37-optimize-big-list/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - performance-optimize-big-list - - - - - - - - diff --git a/apps/performance/37-optimize-big-list/src/main.ts b/apps/performance/37-optimize-big-list/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/performance/37-optimize-big-list/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/performance/37-optimize-big-list/src/styles.scss b/apps/performance/37-optimize-big-list/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/performance/37-optimize-big-list/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/performance/37-optimize-big-list/tailwind.config.js b/apps/performance/37-optimize-big-list/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/performance/37-optimize-big-list/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/performance/37-optimize-big-list/tsconfig.app.json b/apps/performance/37-optimize-big-list/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/37-optimize-big-list/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/37-optimize-big-list/tsconfig.editor.json b/apps/performance/37-optimize-big-list/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/performance/37-optimize-big-list/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/performance/37-optimize-big-list/tsconfig.json b/apps/performance/37-optimize-big-list/tsconfig.json deleted file mode 100644 index 51c7908c5..000000000 --- a/apps/performance/37-optimize-big-list/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/performance/40-web-workers/README.md b/apps/performance/40-web-workers/README.md deleted file mode 100644 index 067777a8f..000000000 --- a/apps/performance/40-web-workers/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Web workers - -> Author: Thomas Laforge - -### Run Application - -```bash -npx nx serve performance-web-workers -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/performance/40-christmas-web-worker/). diff --git a/apps/performance/40-web-workers/project.json b/apps/performance/40-web-workers/project.json deleted file mode 100644 index 99cb6756a..000000000 --- a/apps/performance/40-web-workers/project.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "performance-web-workers", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/performance/40-web-workers/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/performance/40-web-workers", - "index": "apps/performance/40-web-workers/src/index.html", - "browser": "apps/performance/40-web-workers/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/performance/40-web-workers/tsconfig.app.json", - "assets": [ - "apps/performance/40-web-workers/src/favicon.ico", - "apps/performance/40-web-workers/src/assets" - ], - "styles": ["apps/performance/40-web-workers/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "performance-web-workers:build:production" - }, - "development": { - "buildTarget": "performance-web-workers:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "performance-web-workers:build" - } - } - } -} diff --git a/apps/performance/40-web-workers/src/app/app.component.ts b/apps/performance/40-web-workers/src/app/app.component.ts deleted file mode 100644 index da63f1012..000000000 --- a/apps/performance/40-web-workers/src/app/app.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { HeavyCalculationService } from './heavy-calculation.service'; -import { UnknownPersonComponent } from './unknown-person/unknown-person.component'; - -@Component({ - imports: [UnknownPersonComponent], - providers: [HeavyCalculationService], - selector: 'app-root', - template: ` - - -
Progress: {{ loadingPercentage() }}%
- `, - host: { - class: `flex flex-col h-screen w-screen bg-[#1f75c0]`, - }, -}) -export class AppComponent { - private heavyCalculationService = inject(HeavyCalculationService); - - readonly loadingPercentage = this.heavyCalculationService.loadingPercentage; - - discover() { - this.heavyCalculationService.startLoading(); - } -} diff --git a/apps/performance/40-web-workers/src/app/heavy-calculation.service.ts b/apps/performance/40-web-workers/src/app/heavy-calculation.service.ts deleted file mode 100644 index 06dedd1a6..000000000 --- a/apps/performance/40-web-workers/src/app/heavy-calculation.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Injectable, computed, signal } from '@angular/core'; - -@Injectable() -export class HeavyCalculationService { - private finalLength = 664579; - private loadingLength = signal(0); - - loadingPercentage = computed( - () => (this.loadingLength() * 100) / this.finalLength, - ); - - startLoading() { - this.randomHeavyCalculationFunction(); - } - - private randomHeavyCalculationFunction() { - for (let num = 2; num <= 10000000; num++) { - let randomFlag = true; - for (let i = 2; i <= Math.sqrt(num); i++) { - if (num % i === 0) { - randomFlag = false; - break; - } - } - if (randomFlag) { - this.loadingLength.update((l) => l + 1); - } - } - } -} diff --git a/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.css b/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.css deleted file mode 100644 index edc1f75ad..000000000 --- a/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.css +++ /dev/null @@ -1,225 +0,0 @@ -*, -*:before, -*:after { - padding: 0; - margin: 0; - box-sizing: border-box; -} -body { - background-color: #fff2c8; -} -.container { - width: 380px; - height: 500px; - position: absolute; - transform: translate(-50%, -50%); - top: 50%; - left: 50%; -} -.container *:before, -.container *:after { - position: absolute; - content: ''; -} -.santa { - height: 220px; - width: 200px; - background-color: #e84701; - border-radius: 80px; - position: absolute; - left: 115px; - top: 200px; -} -.santa:before, -.santa:after { - width: 40px; - margin: auto; - left: 0; - right: 0; - background-color: #fff2c8; -} -.santa:before { - height: 130px; -} -.santa:after { - height: 40px; - bottom: -15px; -} -.hand-l { - background-color: #e84701; - height: 90px; - width: 105px; - position: absolute; - right: -30px; - top: 20px; - border-radius: 0 80px 0 0; -} -.hand-l:before { - margin: auto; - width: 35px; - height: 15px; - background-color: #ffffff; - top: 85px; - left: 71px; -} -.hand-l:after { - height: 15px; - width: 30px; - background-color: #fad2af; - left: 74px; - top: 101px; - border-radius: 0 0 30px 30px; -} -.hand-r { - height: 150px; - width: 180px; - border: 30px solid transparent; - border-bottom: 40px solid #e84701; - position: absolute; - left: -100px; - bottom: 150px; - border-radius: 50%; - animation: wave 1.5s infinite; - transform-origin: right; -} -@keyframes wave { - 50% { - transform: rotate(15deg); - } -} -.hand-r:before { - width: 35px; - height: 15px; - background-color: #ffffff; - transform: rotate(-50deg); - top: 68px; - left: -22px; -} -.hand-r:after { - width: 30px; - height: 15px; - background-color: #fad2af; - transform: rotate(-50deg); - left: -31px; - top: 58px; - border-radius: 15px 15px 0 0; -} -.face { - position: absolute; - margin: auto; - height: 180px; - width: 180px; - background-color: #fad2af; - border: 25px solid #f2e6da; - border-radius: 50%; - left: 0; - right: 0; - bottom: 140px; -} -.beard { - position: absolute; - height: 90px; - width: 180px; - background-color: #ffffff; - border-radius: 0 0 90px 90px; - right: -25px; - bottom: -25px; -} -.beard:before { - width: 55px; - height: 25px; - background-color: #f2e6da; - border-radius: 20px 0; - left: 34px; -} -.beard:after { - height: 25px; - width: 55px; - background-color: #f2e6da; - border-radius: 0 20px; - right: 34px; -} -.eyes { - height: 12px; - width: 12px; - background-color: #0078ca; - border-radius: 50%; - position: absolute; - top: 40px; - left: 40px; - box-shadow: - 38px 0 #0078ca, - 19px 20px #f69697; -} -.eyes:before { - height: 12px; - width: 25px; - background-color: #ffffff; - border-radius: 10px 0; - left: -10px; - bottom: 20px; -} -.eyes:after { - height: 12px; - width: 25px; - background-color: #ffffff; - border-radius: 0 10px; - left: 32px; - bottom: 20px; -} -.hat { - position: absolute; - height: 60px; - width: 120px; - background-color: #e84701; - top: -98px; - left: 85px; - border-radius: 0 0 60px 60px; -} -.hat:before { - height: 40px; - width: 40px; - background-color: #ffffff; - left: 100px; - top: -15px; - border-radius: 50%; -} -.belt { - position: absolute; - width: 100%; - height: 30px; - background-color: #000000; - top: 100px; -} -.belt:before { - height: 100%; - width: 40px; - border: 7px solid #ffdc2e; - margin: auto; - left: 0; - right: 0; -} -.belt:after { - height: 5px; - width: 15px; - background-color: #ffdc2e; - left: 100px; - top: 12px; -} -.shoe { - height: 20px; - width: 20px; - background-color: #000000; - position: absolute; - top: 220px; - left: 60px; - border-radius: 20px 0 0 0; -} -.shoe:before { - height: 20px; - width: 20px; - background-color: #000000; - top: 0; - left: 60px; - border-radius: 0 20px 0 0; -} diff --git a/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.ts b/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.ts deleted file mode 100644 index 5a0d4bd96..000000000 --- a/apps/performance/40-web-workers/src/app/unknown-person/unknown-person.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component, input } from '@angular/core'; - -@Component({ - selector: 'unknown-person', - template: ` -
- @if (step() !== 100) { -
- Who is here? -
- } -
-
Happy Christmas !!!
-
-
-
-
-
-
-
-
-
-
-
-
-
- `, - styleUrls: [`unknown-person.component.css`], -}) -export class UnknownPersonComponent { - step = input.required(); -} diff --git a/apps/performance/40-web-workers/src/favicon.ico b/apps/performance/40-web-workers/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/performance/40-web-workers/src/favicon.ico and /dev/null differ diff --git a/apps/performance/40-web-workers/src/index.html b/apps/performance/40-web-workers/src/index.html deleted file mode 100644 index fa0cf99ae..000000000 --- a/apps/performance/40-web-workers/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - performance-web-worker - - - - - - - - diff --git a/apps/performance/40-web-workers/src/main.ts b/apps/performance/40-web-workers/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/performance/40-web-workers/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/performance/40-web-workers/src/styles.scss b/apps/performance/40-web-workers/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/performance/40-web-workers/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/performance/40-web-workers/tailwind.config.js b/apps/performance/40-web-workers/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/performance/40-web-workers/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/performance/40-web-workers/tsconfig.app.json b/apps/performance/40-web-workers/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/performance/40-web-workers/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/performance/40-web-workers/tsconfig.editor.json b/apps/performance/40-web-workers/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/performance/40-web-workers/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/performance/40-web-workers/tsconfig.json b/apps/performance/40-web-workers/tsconfig.json deleted file mode 100644 index 51c7908c5..000000000 --- a/apps/performance/40-web-workers/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/angular/32-change-detection-bug/.eslintrc.json b/apps/routing/anchor-navigation/.eslintrc.json similarity index 100% rename from apps/angular/32-change-detection-bug/.eslintrc.json rename to apps/routing/anchor-navigation/.eslintrc.json diff --git a/apps/angular/21-anchor-navigation/README.md b/apps/routing/anchor-navigation/README.md similarity index 100% rename from apps/angular/21-anchor-navigation/README.md rename to apps/routing/anchor-navigation/README.md diff --git a/apps/angular/21-anchor-navigation/jest.config.ts b/apps/routing/anchor-navigation/jest.config.ts similarity index 100% rename from apps/angular/21-anchor-navigation/jest.config.ts rename to apps/routing/anchor-navigation/jest.config.ts diff --git a/apps/angular/21-anchor-navigation/project.json b/apps/routing/anchor-navigation/project.json similarity index 100% rename from apps/angular/21-anchor-navigation/project.json rename to apps/routing/anchor-navigation/project.json diff --git a/apps/angular/21-anchor-navigation/src/app/app.component.ts b/apps/routing/anchor-navigation/src/app/app.component.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/app.component.ts rename to apps/routing/anchor-navigation/src/app/app.component.ts diff --git a/apps/angular/21-anchor-navigation/src/app/app.config.ts b/apps/routing/anchor-navigation/src/app/app.config.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/app.config.ts rename to apps/routing/anchor-navigation/src/app/app.config.ts diff --git a/apps/angular/21-anchor-navigation/src/app/app.routes.ts b/apps/routing/anchor-navigation/src/app/app.routes.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/app.routes.ts rename to apps/routing/anchor-navigation/src/app/app.routes.ts diff --git a/apps/angular/21-anchor-navigation/src/app/foo.component.ts b/apps/routing/anchor-navigation/src/app/foo.component.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/foo.component.ts rename to apps/routing/anchor-navigation/src/app/foo.component.ts diff --git a/apps/angular/21-anchor-navigation/src/app/home.component.ts b/apps/routing/anchor-navigation/src/app/home.component.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/home.component.ts rename to apps/routing/anchor-navigation/src/app/home.component.ts diff --git a/apps/angular/21-anchor-navigation/src/app/nav-button.component.ts b/apps/routing/anchor-navigation/src/app/nav-button.component.ts similarity index 100% rename from apps/angular/21-anchor-navigation/src/app/nav-button.component.ts rename to apps/routing/anchor-navigation/src/app/nav-button.component.ts diff --git a/apps/angular/9-wrap-function-pipe/src/assets/.gitkeep b/apps/routing/anchor-navigation/src/assets/.gitkeep similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/assets/.gitkeep rename to apps/routing/anchor-navigation/src/assets/.gitkeep diff --git a/apps/angular/59-content-projection-defer/public/favicon.ico b/apps/routing/anchor-navigation/src/favicon.ico similarity index 100% rename from apps/angular/59-content-projection-defer/public/favicon.ico rename to apps/routing/anchor-navigation/src/favicon.ico diff --git a/apps/angular/21-anchor-navigation/src/index.html b/apps/routing/anchor-navigation/src/index.html similarity index 100% rename from apps/angular/21-anchor-navigation/src/index.html rename to apps/routing/anchor-navigation/src/index.html diff --git a/apps/angular/6-structural-directive/src/main.ts b/apps/routing/anchor-navigation/src/main.ts similarity index 100% rename from apps/angular/6-structural-directive/src/main.ts rename to apps/routing/anchor-navigation/src/main.ts diff --git a/apps/angular/59-content-projection-defer/src/styles.scss b/apps/routing/anchor-navigation/src/styles.scss similarity index 100% rename from apps/angular/59-content-projection-defer/src/styles.scss rename to apps/routing/anchor-navigation/src/styles.scss diff --git a/apps/performance/12-optimize-change-detection/src/test-setup.ts b/apps/routing/anchor-navigation/src/test-setup.ts similarity index 100% rename from apps/performance/12-optimize-change-detection/src/test-setup.ts rename to apps/routing/anchor-navigation/src/test-setup.ts diff --git a/apps/angular/58-content-projection-condition/tailwind.config.js b/apps/routing/anchor-navigation/tailwind.config.js similarity index 100% rename from apps/angular/58-content-projection-condition/tailwind.config.js rename to apps/routing/anchor-navigation/tailwind.config.js diff --git a/apps/routing/anchor-navigation/tsconfig.app.json b/apps/routing/anchor-navigation/tsconfig.app.json new file mode 100644 index 000000000..3bb4877ea --- /dev/null +++ b/apps/routing/anchor-navigation/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": [ + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/forms/41-control-value-accessor/tsconfig.editor.json b/apps/routing/anchor-navigation/tsconfig.editor.json similarity index 100% rename from apps/forms/41-control-value-accessor/tsconfig.editor.json rename to apps/routing/anchor-navigation/tsconfig.editor.json diff --git a/apps/performance/12-optimize-change-detection/tsconfig.json b/apps/routing/anchor-navigation/tsconfig.json similarity index 100% rename from apps/performance/12-optimize-change-detection/tsconfig.json rename to apps/routing/anchor-navigation/tsconfig.json diff --git a/apps/performance/12-optimize-change-detection/tsconfig.spec.json b/apps/routing/anchor-navigation/tsconfig.spec.json similarity index 78% rename from apps/performance/12-optimize-change-detection/tsconfig.spec.json rename to apps/routing/anchor-navigation/tsconfig.spec.json index ca14cc622..173fe9a7d 100644 --- a/apps/performance/12-optimize-change-detection/tsconfig.spec.json +++ b/apps/routing/anchor-navigation/tsconfig.spec.json @@ -5,9 +5,11 @@ "module": "commonjs", "types": ["jest", "node"] }, - "files": ["src/test-setup.ts"], + "files": [ + "src/test-setup.ts" + ], "include": [ - "jest.config.ts", + "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" diff --git a/apps/angular/8-pure-pipe/.eslintrc.json b/apps/routing/async-redirect/.eslintrc.json similarity index 100% rename from apps/angular/8-pure-pipe/.eslintrc.json rename to apps/routing/async-redirect/.eslintrc.json diff --git a/apps/angular/60-async-redirect/README.md b/apps/routing/async-redirect/README.md similarity index 100% rename from apps/angular/60-async-redirect/README.md rename to apps/routing/async-redirect/README.md diff --git a/apps/angular/60-async-redirect/project.json b/apps/routing/async-redirect/project.json similarity index 100% rename from apps/angular/60-async-redirect/project.json rename to apps/routing/async-redirect/project.json diff --git a/apps/angular/6-structural-directive/src/favicon.ico b/apps/routing/async-redirect/public/favicon.ico similarity index 100% rename from apps/angular/6-structural-directive/src/favicon.ico rename to apps/routing/async-redirect/public/favicon.ico diff --git a/apps/angular/60-async-redirect/src/app/admin-page.ts b/apps/routing/async-redirect/src/app/admin-page.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/admin-page.ts rename to apps/routing/async-redirect/src/app/admin-page.ts diff --git a/apps/angular/60-async-redirect/src/app/app.config.ts b/apps/routing/async-redirect/src/app/app.config.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/app.config.ts rename to apps/routing/async-redirect/src/app/app.config.ts diff --git a/apps/angular/60-async-redirect/src/app/app.ts b/apps/routing/async-redirect/src/app/app.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/app.ts rename to apps/routing/async-redirect/src/app/app.ts diff --git a/apps/angular/60-async-redirect/src/app/dashboard.ts b/apps/routing/async-redirect/src/app/dashboard.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/dashboard.ts rename to apps/routing/async-redirect/src/app/dashboard.ts diff --git a/apps/angular/60-async-redirect/src/app/profile-page.ts b/apps/routing/async-redirect/src/app/profile-page.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/profile-page.ts rename to apps/routing/async-redirect/src/app/profile-page.ts diff --git a/apps/angular/60-async-redirect/src/app/routes.ts b/apps/routing/async-redirect/src/app/routes.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/routes.ts rename to apps/routing/async-redirect/src/app/routes.ts diff --git a/apps/angular/60-async-redirect/src/app/user-page.ts b/apps/routing/async-redirect/src/app/user-page.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/user-page.ts rename to apps/routing/async-redirect/src/app/user-page.ts diff --git a/apps/angular/60-async-redirect/src/app/user-profile.service.ts b/apps/routing/async-redirect/src/app/user-profile.service.ts similarity index 100% rename from apps/angular/60-async-redirect/src/app/user-profile.service.ts rename to apps/routing/async-redirect/src/app/user-profile.service.ts diff --git a/apps/angular/60-async-redirect/src/index.html b/apps/routing/async-redirect/src/index.html similarity index 100% rename from apps/angular/60-async-redirect/src/index.html rename to apps/routing/async-redirect/src/index.html diff --git a/apps/angular/60-async-redirect/src/main.ts b/apps/routing/async-redirect/src/main.ts similarity index 100% rename from apps/angular/60-async-redirect/src/main.ts rename to apps/routing/async-redirect/src/main.ts diff --git a/apps/angular/6-structural-directive/src/styles.scss b/apps/routing/async-redirect/src/styles.scss similarity index 100% rename from apps/angular/6-structural-directive/src/styles.scss rename to apps/routing/async-redirect/src/styles.scss diff --git a/apps/angular/59-content-projection-defer/tailwind.config.js b/apps/routing/async-redirect/tailwind.config.js similarity index 100% rename from apps/angular/59-content-projection-defer/tailwind.config.js rename to apps/routing/async-redirect/tailwind.config.js diff --git a/apps/angular/60-async-redirect/tsconfig.app.json b/apps/routing/async-redirect/tsconfig.app.json similarity index 100% rename from apps/angular/60-async-redirect/tsconfig.app.json rename to apps/routing/async-redirect/tsconfig.app.json diff --git a/apps/angular/60-async-redirect/tsconfig.json b/apps/routing/async-redirect/tsconfig.json similarity index 100% rename from apps/angular/60-async-redirect/tsconfig.json rename to apps/routing/async-redirect/tsconfig.json diff --git a/apps/angular/33-decoupling-components/.eslintrc.json b/apps/routing/router-input/.eslintrc.json similarity index 100% rename from apps/angular/33-decoupling-components/.eslintrc.json rename to apps/routing/router-input/.eslintrc.json diff --git a/apps/angular/22-router-input/README.md b/apps/routing/router-input/README.md similarity index 100% rename from apps/angular/22-router-input/README.md rename to apps/routing/router-input/README.md diff --git a/apps/angular/22-router-input/project.json b/apps/routing/router-input/project.json similarity index 100% rename from apps/angular/22-router-input/project.json rename to apps/routing/router-input/project.json diff --git a/apps/angular/22-router-input/src/app/app.component.ts b/apps/routing/router-input/src/app/app.component.ts similarity index 100% rename from apps/angular/22-router-input/src/app/app.component.ts rename to apps/routing/router-input/src/app/app.component.ts diff --git a/apps/angular/22-router-input/src/app/app.config.ts b/apps/routing/router-input/src/app/app.config.ts similarity index 100% rename from apps/angular/22-router-input/src/app/app.config.ts rename to apps/routing/router-input/src/app/app.config.ts diff --git a/apps/angular/22-router-input/src/app/app.routes.ts b/apps/routing/router-input/src/app/app.routes.ts similarity index 100% rename from apps/angular/22-router-input/src/app/app.routes.ts rename to apps/routing/router-input/src/app/app.routes.ts diff --git a/apps/angular/22-router-input/src/app/home.component.ts b/apps/routing/router-input/src/app/home.component.ts similarity index 100% rename from apps/angular/22-router-input/src/app/home.component.ts rename to apps/routing/router-input/src/app/home.component.ts diff --git a/apps/angular/22-router-input/src/app/test.component.ts b/apps/routing/router-input/src/app/test.component.ts similarity index 100% rename from apps/angular/22-router-input/src/app/test.component.ts rename to apps/routing/router-input/src/app/test.component.ts diff --git a/apps/forms/41-control-value-accessor/src/assets/.gitkeep b/apps/routing/router-input/src/assets/.gitkeep similarity index 100% rename from apps/forms/41-control-value-accessor/src/assets/.gitkeep rename to apps/routing/router-input/src/assets/.gitkeep diff --git a/apps/angular/60-async-redirect/public/favicon.ico b/apps/routing/router-input/src/favicon.ico similarity index 100% rename from apps/angular/60-async-redirect/public/favicon.ico rename to apps/routing/router-input/src/favicon.ico diff --git a/apps/angular/22-router-input/src/index.html b/apps/routing/router-input/src/index.html similarity index 100% rename from apps/angular/22-router-input/src/index.html rename to apps/routing/router-input/src/index.html diff --git a/apps/angular/58-content-projection-condition/src/main.ts b/apps/routing/router-input/src/main.ts similarity index 100% rename from apps/angular/58-content-projection-condition/src/main.ts rename to apps/routing/router-input/src/main.ts diff --git a/apps/angular/8-pure-pipe/src/styles.scss b/apps/routing/router-input/src/styles.scss similarity index 100% rename from apps/angular/8-pure-pipe/src/styles.scss rename to apps/routing/router-input/src/styles.scss diff --git a/apps/routing/router-input/tsconfig.app.json b/apps/routing/router-input/tsconfig.app.json new file mode 100644 index 000000000..403fe4f54 --- /dev/null +++ b/apps/routing/router-input/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/44-view-transition/tsconfig.editor.json b/apps/routing/router-input/tsconfig.editor.json similarity index 100% rename from apps/angular/44-view-transition/tsconfig.editor.json rename to apps/routing/router-input/tsconfig.editor.json diff --git a/apps/angular/31-module-to-standalone/tsconfig.json b/apps/routing/router-input/tsconfig.json similarity index 100% rename from apps/angular/31-module-to-standalone/tsconfig.json rename to apps/routing/router-input/tsconfig.json diff --git a/apps/rxjs/11-high-order-operator-bug/src/favicon.ico b/apps/rxjs/11-high-order-operator-bug/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/rxjs/11-high-order-operator-bug/src/favicon.ico and /dev/null differ diff --git a/apps/rxjs/11-high-order-operator-bug/src/main.ts b/apps/rxjs/11-high-order-operator-bug/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/rxjs/11-high-order-operator-bug/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/rxjs/11-high-order-operator-bug/src/styles.scss b/apps/rxjs/11-high-order-operator-bug/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/rxjs/11-high-order-operator-bug/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/rxjs/11-high-order-operator-bug/tsconfig.editor.json b/apps/rxjs/11-high-order-operator-bug/tsconfig.editor.json deleted file mode 100644 index 0f9036b03..000000000 --- a/apps/rxjs/11-high-order-operator-bug/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/rxjs/14-race-condition/.eslintrc.json b/apps/rxjs/14-race-condition/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/rxjs/14-race-condition/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/rxjs/14-race-condition/src/assets/.gitkeep b/apps/rxjs/14-race-condition/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/rxjs/14-race-condition/src/favicon.ico b/apps/rxjs/14-race-condition/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/rxjs/14-race-condition/src/favicon.ico and /dev/null differ diff --git a/apps/rxjs/14-race-condition/tsconfig.editor.json b/apps/rxjs/14-race-condition/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/rxjs/14-race-condition/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/rxjs/38-catch-error/.eslintrc.json b/apps/rxjs/38-catch-error/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/rxjs/38-catch-error/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/rxjs/38-catch-error/src/assets/.gitkeep b/apps/rxjs/38-catch-error/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/rxjs/38-catch-error/src/favicon.ico b/apps/rxjs/38-catch-error/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/rxjs/38-catch-error/src/favicon.ico and /dev/null differ diff --git a/apps/rxjs/38-catch-error/src/main.ts b/apps/rxjs/38-catch-error/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/rxjs/38-catch-error/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/rxjs/38-catch-error/src/styles.scss b/apps/rxjs/38-catch-error/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/rxjs/38-catch-error/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/rxjs/38-catch-error/src/test-setup.ts b/apps/rxjs/38-catch-error/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/rxjs/38-catch-error/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/rxjs/38-catch-error/tailwind.config.js b/apps/rxjs/38-catch-error/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/rxjs/38-catch-error/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/rxjs/38-catch-error/tsconfig.app.json b/apps/rxjs/38-catch-error/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/rxjs/38-catch-error/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/rxjs/38-catch-error/tsconfig.editor.json b/apps/rxjs/38-catch-error/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/rxjs/38-catch-error/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/rxjs/38-catch-error/tsconfig.json b/apps/rxjs/38-catch-error/tsconfig.json deleted file mode 100644 index e85865cf5..000000000 --- a/apps/rxjs/38-catch-error/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/rxjs/49-hold-to-save-button/src/assets/.gitkeep b/apps/rxjs/49-hold-to-save-button/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/rxjs/49-hold-to-save-button/src/favicon.ico b/apps/rxjs/49-hold-to-save-button/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/rxjs/49-hold-to-save-button/src/favicon.ico and /dev/null differ diff --git a/apps/rxjs/49-hold-to-save-button/src/main.ts b/apps/rxjs/49-hold-to-save-button/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/rxjs/49-hold-to-save-button/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/rxjs/49-hold-to-save-button/src/test-setup.ts b/apps/rxjs/49-hold-to-save-button/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/rxjs/49-hold-to-save-button/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/rxjs/49-hold-to-save-button/tailwind.config.js b/apps/rxjs/49-hold-to-save-button/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/rxjs/49-hold-to-save-button/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/rxjs/49-hold-to-save-button/tsconfig.app.json b/apps/rxjs/49-hold-to-save-button/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/rxjs/49-hold-to-save-button/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/rxjs/49-hold-to-save-button/tsconfig.json b/apps/rxjs/49-hold-to-save-button/tsconfig.json deleted file mode 100644 index 4383e7eb8..000000000 --- a/apps/rxjs/49-hold-to-save-button/tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/rxjs/49-hold-to-save-button/tsconfig.spec.json b/apps/rxjs/49-hold-to-save-button/tsconfig.spec.json deleted file mode 100644 index 1a4817a7d..000000000 --- a/apps/rxjs/49-hold-to-save-button/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/performance/12-optimize-change-detection/.eslintrc.json b/apps/rxjs/catch-error/.eslintrc.json similarity index 100% rename from apps/performance/12-optimize-change-detection/.eslintrc.json rename to apps/rxjs/catch-error/.eslintrc.json diff --git a/apps/rxjs/38-catch-error/README.md b/apps/rxjs/catch-error/README.md similarity index 100% rename from apps/rxjs/38-catch-error/README.md rename to apps/rxjs/catch-error/README.md diff --git a/apps/rxjs/38-catch-error/jest.config.ts b/apps/rxjs/catch-error/jest.config.ts similarity index 100% rename from apps/rxjs/38-catch-error/jest.config.ts rename to apps/rxjs/catch-error/jest.config.ts diff --git a/apps/rxjs/38-catch-error/project.json b/apps/rxjs/catch-error/project.json similarity index 100% rename from apps/rxjs/38-catch-error/project.json rename to apps/rxjs/catch-error/project.json diff --git a/apps/rxjs/38-catch-error/src/app/app.component.css b/apps/rxjs/catch-error/src/app/app.component.css similarity index 100% rename from apps/rxjs/38-catch-error/src/app/app.component.css rename to apps/rxjs/catch-error/src/app/app.component.css diff --git a/apps/rxjs/38-catch-error/src/app/app.component.spec.ts b/apps/rxjs/catch-error/src/app/app.component.spec.ts similarity index 100% rename from apps/rxjs/38-catch-error/src/app/app.component.spec.ts rename to apps/rxjs/catch-error/src/app/app.component.spec.ts diff --git a/apps/rxjs/38-catch-error/src/app/app.component.ts b/apps/rxjs/catch-error/src/app/app.component.ts similarity index 100% rename from apps/rxjs/38-catch-error/src/app/app.component.ts rename to apps/rxjs/catch-error/src/app/app.component.ts diff --git a/apps/rxjs/38-catch-error/src/app/app.config.ts b/apps/rxjs/catch-error/src/app/app.config.ts similarity index 100% rename from apps/rxjs/38-catch-error/src/app/app.config.ts rename to apps/rxjs/catch-error/src/app/app.config.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/assets/.gitkeep b/apps/rxjs/catch-error/src/assets/.gitkeep similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/assets/.gitkeep rename to apps/rxjs/catch-error/src/assets/.gitkeep diff --git a/apps/angular/8-pure-pipe/src/favicon.ico b/apps/rxjs/catch-error/src/favicon.ico similarity index 100% rename from apps/angular/8-pure-pipe/src/favicon.ico rename to apps/rxjs/catch-error/src/favicon.ico diff --git a/apps/rxjs/38-catch-error/src/index.html b/apps/rxjs/catch-error/src/index.html similarity index 100% rename from apps/rxjs/38-catch-error/src/index.html rename to apps/rxjs/catch-error/src/index.html diff --git a/apps/angular/59-content-projection-defer/src/main.ts b/apps/rxjs/catch-error/src/main.ts similarity index 100% rename from apps/angular/59-content-projection-defer/src/main.ts rename to apps/rxjs/catch-error/src/main.ts diff --git a/apps/angular/60-async-redirect/src/styles.scss b/apps/rxjs/catch-error/src/styles.scss similarity index 100% rename from apps/angular/60-async-redirect/src/styles.scss rename to apps/rxjs/catch-error/src/styles.scss diff --git a/apps/angular/55-back-button-navigation/src/test-setup.ts b/apps/rxjs/catch-error/src/test-setup.ts similarity index 100% rename from apps/angular/55-back-button-navigation/src/test-setup.ts rename to apps/rxjs/catch-error/src/test-setup.ts diff --git a/apps/angular/6-structural-directive/tailwind.config.js b/apps/rxjs/catch-error/tailwind.config.js similarity index 100% rename from apps/angular/6-structural-directive/tailwind.config.js rename to apps/rxjs/catch-error/tailwind.config.js diff --git a/apps/angular/22-router-input/tsconfig.app.json b/apps/rxjs/catch-error/tsconfig.app.json similarity index 100% rename from apps/angular/22-router-input/tsconfig.app.json rename to apps/rxjs/catch-error/tsconfig.app.json diff --git a/apps/performance/12-optimize-change-detection/tsconfig.editor.json b/apps/rxjs/catch-error/tsconfig.editor.json similarity index 100% rename from apps/performance/12-optimize-change-detection/tsconfig.editor.json rename to apps/rxjs/catch-error/tsconfig.editor.json diff --git a/apps/performance/36-ngfor-optimization/tsconfig.json b/apps/rxjs/catch-error/tsconfig.json similarity index 100% rename from apps/performance/36-ngfor-optimization/tsconfig.json rename to apps/rxjs/catch-error/tsconfig.json diff --git a/apps/angular/32-change-detection-bug/tsconfig.spec.json b/apps/rxjs/catch-error/tsconfig.spec.json similarity index 100% rename from apps/angular/32-change-detection-bug/tsconfig.spec.json rename to apps/rxjs/catch-error/tsconfig.spec.json diff --git a/apps/angular/9-wrap-function-pipe/.eslintrc.json b/apps/rxjs/high-order-operator-bug/.eslintrc.json similarity index 100% rename from apps/angular/9-wrap-function-pipe/.eslintrc.json rename to apps/rxjs/high-order-operator-bug/.eslintrc.json diff --git a/apps/rxjs/11-high-order-operator-bug/README.md b/apps/rxjs/high-order-operator-bug/README.md similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/README.md rename to apps/rxjs/high-order-operator-bug/README.md diff --git a/apps/rxjs/11-high-order-operator-bug/project.json b/apps/rxjs/high-order-operator-bug/project.json similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/project.json rename to apps/rxjs/high-order-operator-bug/project.json diff --git a/apps/rxjs/11-high-order-operator-bug/src/app/app.component.ts b/apps/rxjs/high-order-operator-bug/src/app/app.component.ts similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/src/app/app.component.ts rename to apps/rxjs/high-order-operator-bug/src/app/app.component.ts diff --git a/apps/rxjs/11-high-order-operator-bug/src/app/app.service.ts b/apps/rxjs/high-order-operator-bug/src/app/app.service.ts similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/src/app/app.service.ts rename to apps/rxjs/high-order-operator-bug/src/app/app.service.ts diff --git a/apps/rxjs/11-high-order-operator-bug/src/app/localDB.service.ts b/apps/rxjs/high-order-operator-bug/src/app/localDB.service.ts similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/src/app/localDB.service.ts rename to apps/rxjs/high-order-operator-bug/src/app/localDB.service.ts diff --git a/apps/nx/42-static-vs-dynamic-import/src/assets/.gitkeep b/apps/rxjs/high-order-operator-bug/src/assets/.gitkeep similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/src/assets/.gitkeep rename to apps/rxjs/high-order-operator-bug/src/assets/.gitkeep diff --git a/apps/angular/9-wrap-function-pipe/src/favicon.ico b/apps/rxjs/high-order-operator-bug/src/favicon.ico similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/favicon.ico rename to apps/rxjs/high-order-operator-bug/src/favicon.ico diff --git a/apps/rxjs/11-high-order-operator-bug/src/index.html b/apps/rxjs/high-order-operator-bug/src/index.html similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/src/index.html rename to apps/rxjs/high-order-operator-bug/src/index.html diff --git a/apps/forms/41-control-value-accessor/src/main.ts b/apps/rxjs/high-order-operator-bug/src/main.ts similarity index 100% rename from apps/forms/41-control-value-accessor/src/main.ts rename to apps/rxjs/high-order-operator-bug/src/main.ts diff --git a/apps/angular/9-wrap-function-pipe/src/styles.scss b/apps/rxjs/high-order-operator-bug/src/styles.scss similarity index 100% rename from apps/angular/9-wrap-function-pipe/src/styles.scss rename to apps/rxjs/high-order-operator-bug/src/styles.scss diff --git a/apps/rxjs/11-high-order-operator-bug/tsconfig.app.json b/apps/rxjs/high-order-operator-bug/tsconfig.app.json similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/tsconfig.app.json rename to apps/rxjs/high-order-operator-bug/tsconfig.app.json diff --git a/apps/angular/9-wrap-function-pipe/tsconfig.editor.json b/apps/rxjs/high-order-operator-bug/tsconfig.editor.json similarity index 100% rename from apps/angular/9-wrap-function-pipe/tsconfig.editor.json rename to apps/rxjs/high-order-operator-bug/tsconfig.editor.json diff --git a/apps/rxjs/11-high-order-operator-bug/tsconfig.json b/apps/rxjs/high-order-operator-bug/tsconfig.json similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/tsconfig.json rename to apps/rxjs/high-order-operator-bug/tsconfig.json diff --git a/apps/forms/41-control-value-accessor/.eslintrc.json b/apps/rxjs/hold-to-save-button/.eslintrc.json similarity index 100% rename from apps/forms/41-control-value-accessor/.eslintrc.json rename to apps/rxjs/hold-to-save-button/.eslintrc.json diff --git a/apps/rxjs/49-hold-to-save-button/README.md b/apps/rxjs/hold-to-save-button/README.md similarity index 100% rename from apps/rxjs/49-hold-to-save-button/README.md rename to apps/rxjs/hold-to-save-button/README.md diff --git a/apps/rxjs/49-hold-to-save-button/jest.config.ts b/apps/rxjs/hold-to-save-button/jest.config.ts similarity index 100% rename from apps/rxjs/49-hold-to-save-button/jest.config.ts rename to apps/rxjs/hold-to-save-button/jest.config.ts diff --git a/apps/rxjs/49-hold-to-save-button/project.json b/apps/rxjs/hold-to-save-button/project.json similarity index 100% rename from apps/rxjs/49-hold-to-save-button/project.json rename to apps/rxjs/hold-to-save-button/project.json diff --git a/apps/rxjs/49-hold-to-save-button/src/app/app.component.ts b/apps/rxjs/hold-to-save-button/src/app/app.component.ts similarity index 100% rename from apps/rxjs/49-hold-to-save-button/src/app/app.component.ts rename to apps/rxjs/hold-to-save-button/src/app/app.component.ts diff --git a/apps/angular/46-simple-animations/src/app/app.config.ts b/apps/rxjs/hold-to-save-button/src/app/app.config.ts similarity index 100% rename from apps/angular/46-simple-animations/src/app/app.config.ts rename to apps/rxjs/hold-to-save-button/src/app/app.config.ts diff --git a/apps/performance/12-optimize-change-detection/src/assets/.gitkeep b/apps/rxjs/hold-to-save-button/src/assets/.gitkeep similarity index 100% rename from apps/performance/12-optimize-change-detection/src/assets/.gitkeep rename to apps/rxjs/hold-to-save-button/src/assets/.gitkeep diff --git a/apps/forms/41-control-value-accessor/src/favicon.ico b/apps/rxjs/hold-to-save-button/src/favicon.ico similarity index 100% rename from apps/forms/41-control-value-accessor/src/favicon.ico rename to apps/rxjs/hold-to-save-button/src/favicon.ico diff --git a/apps/rxjs/49-hold-to-save-button/src/index.html b/apps/rxjs/hold-to-save-button/src/index.html similarity index 100% rename from apps/rxjs/49-hold-to-save-button/src/index.html rename to apps/rxjs/hold-to-save-button/src/index.html diff --git a/apps/forms/48-avoid-losing-form-data/src/main.ts b/apps/rxjs/hold-to-save-button/src/main.ts similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/main.ts rename to apps/rxjs/hold-to-save-button/src/main.ts diff --git a/apps/rxjs/49-hold-to-save-button/src/styles.scss b/apps/rxjs/hold-to-save-button/src/styles.scss similarity index 100% rename from apps/rxjs/49-hold-to-save-button/src/styles.scss rename to apps/rxjs/hold-to-save-button/src/styles.scss diff --git a/apps/forms/41-control-value-accessor/src/test-setup.ts b/apps/rxjs/hold-to-save-button/src/test-setup.ts similarity index 100% rename from apps/forms/41-control-value-accessor/src/test-setup.ts rename to apps/rxjs/hold-to-save-button/src/test-setup.ts diff --git a/apps/angular/60-async-redirect/tailwind.config.js b/apps/rxjs/hold-to-save-button/tailwind.config.js similarity index 100% rename from apps/angular/60-async-redirect/tailwind.config.js rename to apps/rxjs/hold-to-save-button/tailwind.config.js diff --git a/apps/angular/31-module-to-standalone/tsconfig.app.json b/apps/rxjs/hold-to-save-button/tsconfig.app.json similarity index 100% rename from apps/angular/31-module-to-standalone/tsconfig.app.json rename to apps/rxjs/hold-to-save-button/tsconfig.app.json diff --git a/apps/angular/57-content-projection-default/tsconfig.editor.json b/apps/rxjs/hold-to-save-button/tsconfig.editor.json similarity index 100% rename from apps/angular/57-content-projection-default/tsconfig.editor.json rename to apps/rxjs/hold-to-save-button/tsconfig.editor.json diff --git a/apps/angular/55-back-button-navigation/tsconfig.json b/apps/rxjs/hold-to-save-button/tsconfig.json similarity index 100% rename from apps/angular/55-back-button-navigation/tsconfig.json rename to apps/rxjs/hold-to-save-button/tsconfig.json diff --git a/apps/angular/46-simple-animations/tsconfig.spec.json b/apps/rxjs/hold-to-save-button/tsconfig.spec.json similarity index 100% rename from apps/angular/46-simple-animations/tsconfig.spec.json rename to apps/rxjs/hold-to-save-button/tsconfig.spec.json diff --git a/apps/performance/34-default-vs-onpush/.eslintrc.json b/apps/rxjs/race-condition/.eslintrc.json similarity index 100% rename from apps/performance/34-default-vs-onpush/.eslintrc.json rename to apps/rxjs/race-condition/.eslintrc.json diff --git a/apps/rxjs/14-race-condition/README.md b/apps/rxjs/race-condition/README.md similarity index 100% rename from apps/rxjs/14-race-condition/README.md rename to apps/rxjs/race-condition/README.md diff --git a/apps/rxjs/14-race-condition/cypress.config.ts b/apps/rxjs/race-condition/cypress.config.ts similarity index 100% rename from apps/rxjs/14-race-condition/cypress.config.ts rename to apps/rxjs/race-condition/cypress.config.ts diff --git a/apps/rxjs/14-race-condition/cypress/fixtures/example.json b/apps/rxjs/race-condition/cypress/fixtures/example.json similarity index 100% rename from apps/rxjs/14-race-condition/cypress/fixtures/example.json rename to apps/rxjs/race-condition/cypress/fixtures/example.json diff --git a/apps/rxjs/14-race-condition/cypress/support/commands.ts b/apps/rxjs/race-condition/cypress/support/commands.ts similarity index 100% rename from apps/rxjs/14-race-condition/cypress/support/commands.ts rename to apps/rxjs/race-condition/cypress/support/commands.ts diff --git a/apps/rxjs/14-race-condition/cypress/support/component-index.html b/apps/rxjs/race-condition/cypress/support/component-index.html similarity index 100% rename from apps/rxjs/14-race-condition/cypress/support/component-index.html rename to apps/rxjs/race-condition/cypress/support/component-index.html diff --git a/apps/rxjs/14-race-condition/cypress/support/component.ts b/apps/rxjs/race-condition/cypress/support/component.ts similarity index 100% rename from apps/rxjs/14-race-condition/cypress/support/component.ts rename to apps/rxjs/race-condition/cypress/support/component.ts diff --git a/apps/rxjs/14-race-condition/cypress/tsconfig.json b/apps/rxjs/race-condition/cypress/tsconfig.json similarity index 100% rename from apps/rxjs/14-race-condition/cypress/tsconfig.json rename to apps/rxjs/race-condition/cypress/tsconfig.json diff --git a/apps/rxjs/14-race-condition/jest.config.ts b/apps/rxjs/race-condition/jest.config.ts similarity index 100% rename from apps/rxjs/14-race-condition/jest.config.ts rename to apps/rxjs/race-condition/jest.config.ts diff --git a/apps/rxjs/14-race-condition/project.json b/apps/rxjs/race-condition/project.json similarity index 100% rename from apps/rxjs/14-race-condition/project.json rename to apps/rxjs/race-condition/project.json diff --git a/apps/rxjs/14-race-condition/src/app/app.component.cy.ts b/apps/rxjs/race-condition/src/app/app.component.cy.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/app/app.component.cy.ts rename to apps/rxjs/race-condition/src/app/app.component.cy.ts diff --git a/apps/rxjs/14-race-condition/src/app/app.component.ts b/apps/rxjs/race-condition/src/app/app.component.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/app/app.component.ts rename to apps/rxjs/race-condition/src/app/app.component.ts diff --git a/apps/rxjs/14-race-condition/src/app/app.config.ts b/apps/rxjs/race-condition/src/app/app.config.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/app/app.config.ts rename to apps/rxjs/race-condition/src/app/app.config.ts diff --git a/apps/rxjs/14-race-condition/src/app/topic-dialog.component.ts b/apps/rxjs/race-condition/src/app/topic-dialog.component.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/app/topic-dialog.component.ts rename to apps/rxjs/race-condition/src/app/topic-dialog.component.ts diff --git a/apps/rxjs/14-race-condition/src/app/topic.service.ts b/apps/rxjs/race-condition/src/app/topic.service.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/app/topic.service.ts rename to apps/rxjs/race-condition/src/app/topic.service.ts diff --git a/apps/performance/34-default-vs-onpush/src/assets/.gitkeep b/apps/rxjs/race-condition/src/assets/.gitkeep similarity index 100% rename from apps/performance/34-default-vs-onpush/src/assets/.gitkeep rename to apps/rxjs/race-condition/src/assets/.gitkeep diff --git a/apps/forms/48-avoid-losing-form-data/src/favicon.ico b/apps/rxjs/race-condition/src/favicon.ico similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/favicon.ico rename to apps/rxjs/race-condition/src/favicon.ico diff --git a/apps/rxjs/14-race-condition/src/index.html b/apps/rxjs/race-condition/src/index.html similarity index 100% rename from apps/rxjs/14-race-condition/src/index.html rename to apps/rxjs/race-condition/src/index.html diff --git a/apps/rxjs/14-race-condition/src/main.ts b/apps/rxjs/race-condition/src/main.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/main.ts rename to apps/rxjs/race-condition/src/main.ts diff --git a/apps/rxjs/14-race-condition/src/styles.scss b/apps/rxjs/race-condition/src/styles.scss similarity index 100% rename from apps/rxjs/14-race-condition/src/styles.scss rename to apps/rxjs/race-condition/src/styles.scss diff --git a/apps/rxjs/14-race-condition/src/test-setup.ts b/apps/rxjs/race-condition/src/test-setup.ts similarity index 100% rename from apps/rxjs/14-race-condition/src/test-setup.ts rename to apps/rxjs/race-condition/src/test-setup.ts diff --git a/apps/rxjs/14-race-condition/tsconfig.app.json b/apps/rxjs/race-condition/tsconfig.app.json similarity index 100% rename from apps/rxjs/14-race-condition/tsconfig.app.json rename to apps/rxjs/race-condition/tsconfig.app.json diff --git a/apps/performance/36-ngfor-optimization/tsconfig.editor.json b/apps/rxjs/race-condition/tsconfig.editor.json similarity index 100% rename from apps/performance/36-ngfor-optimization/tsconfig.editor.json rename to apps/rxjs/race-condition/tsconfig.editor.json diff --git a/apps/rxjs/14-race-condition/tsconfig.json b/apps/rxjs/race-condition/tsconfig.json similarity index 100% rename from apps/rxjs/14-race-condition/tsconfig.json rename to apps/rxjs/race-condition/tsconfig.json diff --git a/apps/angular/21-anchor-navigation/tsconfig.spec.json b/apps/rxjs/race-condition/tsconfig.spec.json similarity index 100% rename from apps/angular/21-anchor-navigation/tsconfig.spec.json rename to apps/rxjs/race-condition/tsconfig.spec.json diff --git a/apps/signal/30-interop-rxjs-signal/.eslintrc.json b/apps/signal/30-interop-rxjs-signal/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/signal/30-interop-rxjs-signal/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/30-interop-rxjs-signal/README.md b/apps/signal/30-interop-rxjs-signal/README.md deleted file mode 100644 index f726d1b0f..000000000 --- a/apps/signal/30-interop-rxjs-signal/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Interoperability Rxjs/Signal - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve signal-interop-rxjs-signal -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/30-interop-rxjs-signal/). diff --git a/apps/signal/30-interop-rxjs-signal/jest.config.ts b/apps/signal/30-interop-rxjs-signal/jest.config.ts deleted file mode 100644 index 9f2001768..000000000 --- a/apps/signal/30-interop-rxjs-signal/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'signal-interop-rxjs-signal', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/signal/30-interop-rxjs-signal', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/signal/30-interop-rxjs-signal/project.json b/apps/signal/30-interop-rxjs-signal/project.json deleted file mode 100644 index b03dd4c15..000000000 --- a/apps/signal/30-interop-rxjs-signal/project.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "signal-interop-rxjs-signal", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/signal/30-interop-rxjs-signal/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/signal/30-interop-rxjs-signal", - "index": "apps/signal/30-interop-rxjs-signal/src/index.html", - "main": "apps/signal/30-interop-rxjs-signal/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/signal/30-interop-rxjs-signal/tsconfig.app.json", - "assets": [ - "apps/signal/30-interop-rxjs-signal/src/favicon.ico", - "apps/signal/30-interop-rxjs-signal/src/assets" - ], - "styles": [ - "apps/signal/30-interop-rxjs-signal/src/styles.scss", - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "signal-interop-rxjs-signal:build:production" - }, - "development": { - "buildTarget": "signal-interop-rxjs-signal:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "signal-interop-rxjs-signal:build" - } - }, - "test": { - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/app.component.ts b/apps/signal/30-interop-rxjs-signal/src/app/app.component.ts deleted file mode 100644 index 54fa2b85d..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/app.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; - -@Component({ - imports: [RouterOutlet], - selector: 'app-root', - template: ` - - `, - styles: [''], -}) -export class AppComponent {} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/app.config.ts b/apps/signal/30-interop-rxjs-signal/src/app/app.config.ts deleted file mode 100644 index 2885bb0de..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/app.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { provideHttpClient } from '@angular/common/http'; -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; -import { provideRouter, withComponentInputBinding } from '@angular/router'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideHttpClient(), - provideAnimations(), - provideRouter( - [ - { - path: '', - pathMatch: 'full', - loadComponent: () => import('./list/photos.component'), - }, - { - path: 'detail', - loadComponent: () => import('./detail/detail.component'), - }, - { - path: '**', - redirectTo: '', - }, - ], - withComponentInputBinding(), - ), - ], -}; diff --git a/apps/signal/30-interop-rxjs-signal/src/app/detail/detail.component.ts b/apps/signal/30-interop-rxjs-signal/src/app/detail/detail.component.ts deleted file mode 100644 index 070bf7d7c..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/detail/detail.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { DatePipe } from '@angular/common'; -import { Component, Input as RouterInput } from '@angular/core'; -import { RouterLink } from '@angular/router'; -import { Photo } from '../photo.model'; - -@Component({ - selector: 'app-photos', - imports: [DatePipe, RouterLink], - template: ` - {{ photo.title }} -

- Title: - {{ photo.title }} -

-

- Owner: - {{ photo.ownername }} -

-

- Date: - {{ photo.datetaken | date }} -

-

- Tags: - {{ photo.tags }} -

- - - `, - host: { - class: 'p-5 block', - }, -}) -export default class DetailComponent { - @RouterInput({ - required: true, - transform: (value: string) => JSON.parse(decodeURIComponent(value)), - }) - photo!: Photo; -} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/list/photos.component.ts b/apps/signal/30-interop-rxjs-signal/src/app/list/photos.component.ts deleted file mode 100644 index 7ba115027..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/list/photos.component.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { Component, inject, OnInit } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { RouterLinkWithHref } from '@angular/router'; -import { provideComponentStore } from '@ngrx/component-store'; -import { - debounceTime, - distinctUntilChanged, - Observable, - skipWhile, - tap, -} from 'rxjs'; -import { Photo } from '../photo.model'; -import { PhotoStore } from './photos.store'; - -@Component({ - selector: 'app-photos', - imports: [ - ReactiveFormsModule, - MatFormFieldModule, - MatProgressBarModule, - MatInputModule, - RouterLinkWithHref, - AsyncPipe, - ], - template: ` -

Photos

- - - Search - - - - @let vm = vm$ | async; -
-
- - - Page :{{ vm.page }} / {{ vm.pages }} -
- @if (vm.loading) { - - } - @if (vm.photos && vm.photos.length > 0) { -
    - @for ( - photo of vm.photos; - track photo.id; - let i = $index - ) { -
  • - - {{ photo.title }} - -
  • - } -
- } @else { -
No Photos found. Type a search word.
- } -
- {{ vm.error }} -
-
- `, - providers: [provideComponentStore(PhotoStore)], - host: { - class: 'p-5 block', - }, -}) -export default class PhotosComponent implements OnInit { - store = inject(PhotoStore); - readonly vm$: Observable<{ - photos: Photo[]; - search: string; - page: number; - pages: number; - endOfPage: boolean; - loading: boolean; - error: unknown; - }> = this.store.vm$.pipe( - tap(({ search }) => { - if (!this.formInit) { - this.search.setValue(search); - this.formInit = true; - } - }), - ); - - private formInit = false; - search = new FormControl(); - - ngOnInit(): void { - this.store.search( - this.search.valueChanges.pipe( - skipWhile(() => !this.formInit), - debounceTime(300), - distinctUntilChanged(), - ), - ); - } - - encode(photo: Photo) { - return encodeURIComponent(JSON.stringify(photo)); - } -} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/list/photos.store.ts b/apps/signal/30-interop-rxjs-signal/src/app/list/photos.store.ts deleted file mode 100644 index f1315e87e..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/list/photos.store.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { inject, Injectable } from '@angular/core'; -import { - ComponentStore, - OnStateInit, - OnStoreInit, -} from '@ngrx/component-store'; -import { tapResponse } from '@ngrx/operators'; -import { pipe } from 'rxjs'; -import { filter, mergeMap, tap } from 'rxjs/operators'; -import { Photo } from '../photo.model'; -import { PhotoService } from '../photos.service'; - -const PHOTO_STATE_KEY = 'photo_search'; - -export interface PhotoState { - photos: Photo[]; - search: string; - page: number; - pages: number; - loading: boolean; - error: unknown; -} - -const initialState: PhotoState = { - photos: [], - search: '', - page: 1, - pages: 1, - loading: false, - error: '', -}; - -@Injectable() -export class PhotoStore - extends ComponentStore - implements OnStoreInit, OnStateInit -{ - private photoService = inject(PhotoService); - - private readonly photos$ = this.select((s) => s.photos); - private readonly search$ = this.select((s) => s.search); - private readonly page$ = this.select((s) => s.page); - private readonly pages$ = this.select((s) => s.pages); - private readonly error$ = this.select((s) => s.error); - private readonly loading$ = this.select((s) => s.loading); - - private readonly endOfPage$ = this.select( - this.page$, - this.pages$, - (page, pages) => page === pages, - ); - - readonly vm$ = this.select( - { - photos: this.photos$, - search: this.search$, - page: this.page$, - pages: this.pages$, - endOfPage: this.endOfPage$, - loading: this.loading$, - error: this.error$, - }, - { debounce: true }, - ); - - ngrxOnStoreInit() { - const savedJSONState = localStorage.getItem(PHOTO_STATE_KEY); - if (savedJSONState === null) { - this.setState(initialState); - } else { - const savedState = JSON.parse(savedJSONState); - this.setState({ - ...initialState, - search: savedState.search, - page: savedState.page, - }); - } - } - - ngrxOnStateInit() { - this.searchPhotos( - this.select({ - search: this.search$, - page: this.page$, - }), - ); - } - - readonly search = this.updater( - (state, search: string): PhotoState => ({ - ...state, - search, - page: 1, - }), - ); - - readonly nextPage = this.updater( - (state): PhotoState => ({ - ...state, - page: state.page + 1, - }), - ); - - readonly previousPage = this.updater( - (state): PhotoState => ({ - ...state, - page: state.page - 1, - }), - ); - - readonly searchPhotos = this.effect<{ search: string; page: number }>( - pipe( - filter(({ search }) => search.length >= 3), - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap(({ search, page }) => - this.photoService.searchPublicPhotos(search, page).pipe( - tapResponse( - ({ photos: { photo, pages } }) => { - this.patchState({ - loading: false, - photos: photo, - pages, - }); - localStorage.setItem( - PHOTO_STATE_KEY, - JSON.stringify({ search, page }), - ); - }, - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); -} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/photo.model.ts b/apps/signal/30-interop-rxjs-signal/src/app/photo.model.ts deleted file mode 100644 index c3360fd7a..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/photo.model.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface Photo { - id: string; - owner: string; - secret: string; - server: string; - farm: number; - title: string; - ispublic: number; - isfriend: number; - isfamily: number; - datetaken: string; - datetakengranularity: number; - datetakenunknown: string; - ownername: string; - tags: string; - url_q: string; - height_q: number; - width_q: number; - url_m: string; - height_m: number; - width_m: number; -} diff --git a/apps/signal/30-interop-rxjs-signal/src/app/photos.service.ts b/apps/signal/30-interop-rxjs-signal/src/app/photos.service.ts deleted file mode 100644 index c540118f6..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/app/photos.service.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Injectable, inject } from '@angular/core'; -import { Observable } from 'rxjs'; -import { Photo } from './photo.model'; - -export interface FlickrAPIResponse { - photos: { - page: number; - pages: number; - perpage: number; - total: number; - photo: Photo[]; - }; - stat: string; -} - -@Injectable({ providedIn: 'root' }) -export class PhotoService { - private http = inject(HttpClient); - - public searchPublicPhotos( - searchTerm: string, - page: number, - ): Observable { - return this.http.get( - 'https://www.flickr.com/services/rest/', - { - params: { - tags: searchTerm, - method: 'flickr.photos.search', - format: 'json', - nojsoncallback: '1', - tag_mode: 'all', - media: 'photos', - per_page: '30', - page, - extras: 'tags,date_taken,owner_name,url_q,url_m', - api_key: 'c3050d39a5bb308d9921bef0e15c437d', - }, - }, - ); - } -} diff --git a/apps/signal/30-interop-rxjs-signal/src/assets/.gitkeep b/apps/signal/30-interop-rxjs-signal/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/30-interop-rxjs-signal/src/favicon.ico b/apps/signal/30-interop-rxjs-signal/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/30-interop-rxjs-signal/src/favicon.ico and /dev/null differ diff --git a/apps/signal/30-interop-rxjs-signal/src/index.html b/apps/signal/30-interop-rxjs-signal/src/index.html deleted file mode 100644 index c8a8e0de5..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - signal-interop-rxjs-signal - - - - - - - - diff --git a/apps/signal/30-interop-rxjs-signal/src/main.ts b/apps/signal/30-interop-rxjs-signal/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/30-interop-rxjs-signal/src/styles.scss b/apps/signal/30-interop-rxjs-signal/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/30-interop-rxjs-signal/src/test-setup.ts b/apps/signal/30-interop-rxjs-signal/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/signal/30-interop-rxjs-signal/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/signal/30-interop-rxjs-signal/tailwind.config.js b/apps/signal/30-interop-rxjs-signal/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/30-interop-rxjs-signal/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/30-interop-rxjs-signal/tsconfig.app.json b/apps/signal/30-interop-rxjs-signal/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/30-interop-rxjs-signal/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/30-interop-rxjs-signal/tsconfig.editor.json b/apps/signal/30-interop-rxjs-signal/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/signal/30-interop-rxjs-signal/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/signal/30-interop-rxjs-signal/tsconfig.json b/apps/signal/30-interop-rxjs-signal/tsconfig.json deleted file mode 100644 index e85865cf5..000000000 --- a/apps/signal/30-interop-rxjs-signal/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/signal/30-interop-rxjs-signal/tsconfig.spec.json b/apps/signal/30-interop-rxjs-signal/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/signal/30-interop-rxjs-signal/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/signal/43-signal-input/.eslintrc.json b/apps/signal/43-signal-input/.eslintrc.json deleted file mode 100644 index 8ebcbfd59..000000000 --- a/apps/signal/43-signal-input/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/43-signal-input/src/assets/.gitkeep b/apps/signal/43-signal-input/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/43-signal-input/src/favicon.ico b/apps/signal/43-signal-input/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/43-signal-input/src/favicon.ico and /dev/null differ diff --git a/apps/signal/43-signal-input/src/main.ts b/apps/signal/43-signal-input/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/43-signal-input/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/43-signal-input/src/styles.scss b/apps/signal/43-signal-input/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/43-signal-input/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/43-signal-input/tailwind.config.js b/apps/signal/43-signal-input/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/43-signal-input/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/43-signal-input/tsconfig.app.json b/apps/signal/43-signal-input/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/43-signal-input/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/43-signal-input/tsconfig.editor.json b/apps/signal/43-signal-input/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/signal/43-signal-input/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/signal/43-signal-input/tsconfig.json b/apps/signal/43-signal-input/tsconfig.json deleted file mode 100644 index b94f8837d..000000000 --- a/apps/signal/43-signal-input/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/signal/50-bug-in-effect/.eslintrc.json b/apps/signal/50-bug-in-effect/.eslintrc.json deleted file mode 100644 index 8ebcbfd59..000000000 --- a/apps/signal/50-bug-in-effect/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/50-bug-in-effect/src/assets/.gitkeep b/apps/signal/50-bug-in-effect/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/50-bug-in-effect/src/favicon.ico b/apps/signal/50-bug-in-effect/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/50-bug-in-effect/src/favicon.ico and /dev/null differ diff --git a/apps/signal/50-bug-in-effect/src/main.ts b/apps/signal/50-bug-in-effect/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/50-bug-in-effect/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/50-bug-in-effect/src/styles.scss b/apps/signal/50-bug-in-effect/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/50-bug-in-effect/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/50-bug-in-effect/tailwind.config.js b/apps/signal/50-bug-in-effect/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/50-bug-in-effect/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/50-bug-in-effect/tsconfig.app.json b/apps/signal/50-bug-in-effect/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/50-bug-in-effect/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/51-function-call-effect/.eslintrc.json b/apps/signal/51-function-call-effect/.eslintrc.json deleted file mode 100644 index 8ebcbfd59..000000000 --- a/apps/signal/51-function-call-effect/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/51-function-call-effect/src/app/app.config.ts b/apps/signal/51-function-call-effect/src/app/app.config.ts deleted file mode 100644 index 81a6edde4..000000000 --- a/apps/signal/51-function-call-effect/src/app/app.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; - -export const appConfig: ApplicationConfig = { - providers: [], -}; diff --git a/apps/signal/51-function-call-effect/src/assets/.gitkeep b/apps/signal/51-function-call-effect/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/51-function-call-effect/src/favicon.ico b/apps/signal/51-function-call-effect/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/51-function-call-effect/src/favicon.ico and /dev/null differ diff --git a/apps/signal/51-function-call-effect/src/main.ts b/apps/signal/51-function-call-effect/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/51-function-call-effect/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/51-function-call-effect/src/styles.scss b/apps/signal/51-function-call-effect/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/51-function-call-effect/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/51-function-call-effect/tailwind.config.js b/apps/signal/51-function-call-effect/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/51-function-call-effect/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/51-function-call-effect/tsconfig.app.json b/apps/signal/51-function-call-effect/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/51-function-call-effect/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/51-function-call-effect/tsconfig.editor.json b/apps/signal/51-function-call-effect/tsconfig.editor.json deleted file mode 100644 index a8ac182c0..000000000 --- a/apps/signal/51-function-call-effect/tsconfig.editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/53-big-signal-performance/.eslintrc.json b/apps/signal/53-big-signal-performance/.eslintrc.json deleted file mode 100644 index d3cd7997a..000000000 --- a/apps/signal/53-big-signal-performance/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": {} - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/53-big-signal-performance/README.md b/apps/signal/53-big-signal-performance/README.md deleted file mode 100644 index 2b1b56672..000000000 --- a/apps/signal/53-big-signal-performance/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Big Signal Performance - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve signal-big-signal-performance -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/signal/52-big-signal-performance/). diff --git a/apps/signal/53-big-signal-performance/project.json b/apps/signal/53-big-signal-performance/project.json deleted file mode 100644 index 9795c4032..000000000 --- a/apps/signal/53-big-signal-performance/project.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "signal-big-signal-performance", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/signal/53-big-signal-performance/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/signal/53-big-signal-performance", - "index": "apps/signal/53-big-signal-performance/src/index.html", - "browser": "apps/signal/53-big-signal-performance/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/signal/53-big-signal-performance/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/signal/53-big-signal-performance/src/favicon.ico", - "apps/signal/53-big-signal-performance/src/assets" - ], - "styles": ["apps/signal/53-big-signal-performance/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "signal-big-signal-performance:build:production" - }, - "development": { - "buildTarget": "signal-big-signal-performance:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "signal-big-signal-performance:build" - } - } - } -} diff --git a/apps/signal/53-big-signal-performance/src/app/address.component.ts b/apps/signal/53-big-signal-performance/src/app/address.component.ts deleted file mode 100644 index f894d697e..000000000 --- a/apps/signal/53-big-signal-performance/src/app/address.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CDFlashingDirective } from '@angular-challenges/shared/directives'; -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { UserStore } from './user.service'; - -@Component({ - selector: 'address-user', - template: ` -
- Address: -
Street: {{ userService.user().address.street }}
-
ZipCode: {{ userService.user().address.zipCode }}
-
City: {{ userService.user().address.city }}
-
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CDFlashingDirective], -}) -export class AddressComponent { - userService = inject(UserStore); -} diff --git a/apps/signal/53-big-signal-performance/src/app/app.component.ts b/apps/signal/53-big-signal-performance/src/app/app.component.ts deleted file mode 100644 index bf15a5dc2..000000000 --- a/apps/signal/53-big-signal-performance/src/app/app.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component } from '@angular/core'; -import { AddressComponent } from './address.component'; -import { JobComponent } from './job.component'; -import { NameComponent } from './name.component'; -import { NoteComponent } from './note.component'; -import { UserFormComponent } from './user-form.component'; - -@Component({ - selector: 'app-root', - template: ` - - - - - - `, - styles: [''], - imports: [ - JobComponent, - NameComponent, - AddressComponent, - NoteComponent, - UserFormComponent, - ], -}) -export class AppComponent {} diff --git a/apps/signal/53-big-signal-performance/src/app/app.config.ts b/apps/signal/53-big-signal-performance/src/app/app.config.ts deleted file mode 100644 index 81a6edde4..000000000 --- a/apps/signal/53-big-signal-performance/src/app/app.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; - -export const appConfig: ApplicationConfig = { - providers: [], -}; diff --git a/apps/signal/53-big-signal-performance/src/app/job.component.ts b/apps/signal/53-big-signal-performance/src/app/job.component.ts deleted file mode 100644 index d3186fc9f..000000000 --- a/apps/signal/53-big-signal-performance/src/app/job.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CDFlashingDirective } from '@angular-challenges/shared/directives'; -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { UserStore } from './user.service'; - -@Component({ - selector: 'job', - template: ` -
- Job: -
title: {{ userService.user().title }}
-
salary: {{ userService.user().salary }}
-
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CDFlashingDirective], -}) -export class JobComponent { - userService = inject(UserStore); -} diff --git a/apps/signal/53-big-signal-performance/src/app/name.component.ts b/apps/signal/53-big-signal-performance/src/app/name.component.ts deleted file mode 100644 index f93b5675a..000000000 --- a/apps/signal/53-big-signal-performance/src/app/name.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CDFlashingDirective } from '@angular-challenges/shared/directives'; -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { UserStore } from './user.service'; - -@Component({ - selector: 'name', - template: ` -
- Name: {{ userService.user().name }} -
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CDFlashingDirective], -}) -export class NameComponent { - userService = inject(UserStore); -} diff --git a/apps/signal/53-big-signal-performance/src/app/note.component.ts b/apps/signal/53-big-signal-performance/src/app/note.component.ts deleted file mode 100644 index dd0033962..000000000 --- a/apps/signal/53-big-signal-performance/src/app/note.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CDFlashingDirective } from '@angular-challenges/shared/directives'; -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { UserStore } from './user.service'; - -@Component({ - selector: 'note', - template: ` -
- Note: {{ userService.user().note }} -
- `, - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [CDFlashingDirective], -}) -export class NoteComponent { - userService = inject(UserStore); -} diff --git a/apps/signal/53-big-signal-performance/src/app/user-form.component.ts b/apps/signal/53-big-signal-performance/src/app/user-form.component.ts deleted file mode 100644 index d0f2164ce..000000000 --- a/apps/signal/53-big-signal-performance/src/app/user-form.component.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; -import { UserStore } from './user.service'; - -@Component({ - selector: 'user-form', - imports: [ReactiveFormsModule], - template: ` -
-
- Name: - -
-
- Address: -
- street: - -
-
- zipCode: - -
-
- city: - -
-
-
- note: - -
-
- title: - -
-
- salary: - -
- -
- `, - host: { - class: 'block border border-gray-500 p-4 pt-10 m-4', - }, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class UserFormComponent { - userStore = inject(UserStore); - - form = new FormGroup({ - name: new FormControl(this.userStore.user().name, { nonNullable: true }), - street: new FormControl(this.userStore.user().address.street, { - nonNullable: true, - }), - zipCode: new FormControl(this.userStore.user().address.zipCode, { - nonNullable: true, - }), - city: new FormControl(this.userStore.user().address.city, { - nonNullable: true, - }), - note: new FormControl(this.userStore.user().note, { nonNullable: true }), - title: new FormControl(this.userStore.user().title, { nonNullable: true }), - salary: new FormControl(this.userStore.user().salary, { - nonNullable: true, - }), - }); - - submit() { - this.userStore.user.update((u) => ({ - ...u, - name: this.form.getRawValue().name, - address: { - ...u.address, - street: this.form.getRawValue().street, - zipCode: this.form.getRawValue().zipCode, - city: this.form.getRawValue().city, - }, - note: this.form.getRawValue().note, - title: this.form.getRawValue().title, - salary: this.form.getRawValue().salary, - })); - } -} diff --git a/apps/signal/53-big-signal-performance/src/app/user.service.ts b/apps/signal/53-big-signal-performance/src/app/user.service.ts deleted file mode 100644 index 4b3b7c512..000000000 --- a/apps/signal/53-big-signal-performance/src/app/user.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable, signal } from '@angular/core'; - -@Injectable({ providedIn: 'root' }) -export class UserStore { - user = signal({ - name: 'Bob', - address: { - street: '', - zipCode: '', - city: '', - }, - note: '', - title: '', - salary: 0, - }); -} diff --git a/apps/signal/53-big-signal-performance/src/assets/.gitkeep b/apps/signal/53-big-signal-performance/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/53-big-signal-performance/src/favicon.ico b/apps/signal/53-big-signal-performance/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/53-big-signal-performance/src/favicon.ico and /dev/null differ diff --git a/apps/signal/53-big-signal-performance/src/index.html b/apps/signal/53-big-signal-performance/src/index.html deleted file mode 100644 index 3f038cc7a..000000000 --- a/apps/signal/53-big-signal-performance/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - signal-big-signal-performance - - - - - - - - diff --git a/apps/signal/53-big-signal-performance/src/main.ts b/apps/signal/53-big-signal-performance/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/53-big-signal-performance/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/53-big-signal-performance/src/styles.scss b/apps/signal/53-big-signal-performance/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/53-big-signal-performance/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/53-big-signal-performance/tailwind.config.js b/apps/signal/53-big-signal-performance/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/53-big-signal-performance/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/53-big-signal-performance/tsconfig.app.json b/apps/signal/53-big-signal-performance/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/53-big-signal-performance/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/53-big-signal-performance/tsconfig.editor.json b/apps/signal/53-big-signal-performance/tsconfig.editor.json deleted file mode 100644 index a8ac182c0..000000000 --- a/apps/signal/53-big-signal-performance/tsconfig.editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/54-pipe-observable-to-signal/.eslintrc.json b/apps/signal/54-pipe-observable-to-signal/.eslintrc.json deleted file mode 100644 index d3cd7997a..000000000 --- a/apps/signal/54-pipe-observable-to-signal/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": {} - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/54-pipe-observable-to-signal/src/assets/.gitkeep b/apps/signal/54-pipe-observable-to-signal/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/signal/54-pipe-observable-to-signal/src/favicon.ico b/apps/signal/54-pipe-observable-to-signal/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/54-pipe-observable-to-signal/src/favicon.ico and /dev/null differ diff --git a/apps/signal/54-pipe-observable-to-signal/src/main.ts b/apps/signal/54-pipe-observable-to-signal/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/signal/54-pipe-observable-to-signal/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/signal/54-pipe-observable-to-signal/tailwind.config.js b/apps/signal/54-pipe-observable-to-signal/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/54-pipe-observable-to-signal/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/54-pipe-observable-to-signal/tsconfig.app.json b/apps/signal/54-pipe-observable-to-signal/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/54-pipe-observable-to-signal/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/54-pipe-observable-to-signal/tsconfig.editor.json b/apps/signal/54-pipe-observable-to-signal/tsconfig.editor.json deleted file mode 100644 index a8ac182c0..000000000 --- a/apps/signal/54-pipe-observable-to-signal/tsconfig.editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/56-forms-and-signal/.eslintrc.json b/apps/signal/56-forms-and-signal/.eslintrc.json deleted file mode 100644 index 8ebcbfd59..000000000 --- a/apps/signal/56-forms-and-signal/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/signal/56-forms-and-signal/public/favicon.ico b/apps/signal/56-forms-and-signal/public/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/signal/56-forms-and-signal/public/favicon.ico and /dev/null differ diff --git a/apps/signal/56-forms-and-signal/src/main.ts b/apps/signal/56-forms-and-signal/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/signal/56-forms-and-signal/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/signal/56-forms-and-signal/src/styles.scss b/apps/signal/56-forms-and-signal/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/signal/56-forms-and-signal/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/signal/56-forms-and-signal/tailwind.config.js b/apps/signal/56-forms-and-signal/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/signal/56-forms-and-signal/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/signal/56-forms-and-signal/tsconfig.app.json b/apps/signal/56-forms-and-signal/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/signal/56-forms-and-signal/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/56-forms-and-signal/tsconfig.editor.json b/apps/signal/56-forms-and-signal/tsconfig.editor.json deleted file mode 100644 index a8ac182c0..000000000 --- a/apps/signal/56-forms-and-signal/tsconfig.editor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": {}, - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/signal/56-forms-and-signal/tsconfig.json b/apps/signal/56-forms-and-signal/tsconfig.json deleted file mode 100644 index 3df17b921..000000000 --- a/apps/signal/56-forms-and-signal/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.app.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/forms/48-avoid-losing-form-data/.eslintrc.json b/apps/signal/bug-in-effect/.eslintrc.json similarity index 100% rename from apps/forms/48-avoid-losing-form-data/.eslintrc.json rename to apps/signal/bug-in-effect/.eslintrc.json diff --git a/apps/signal/50-bug-in-effect/README.md b/apps/signal/bug-in-effect/README.md similarity index 100% rename from apps/signal/50-bug-in-effect/README.md rename to apps/signal/bug-in-effect/README.md diff --git a/apps/signal/50-bug-in-effect/project.json b/apps/signal/bug-in-effect/project.json similarity index 100% rename from apps/signal/50-bug-in-effect/project.json rename to apps/signal/bug-in-effect/project.json diff --git a/apps/signal/50-bug-in-effect/src/app/app.component.ts b/apps/signal/bug-in-effect/src/app/app.component.ts similarity index 100% rename from apps/signal/50-bug-in-effect/src/app/app.component.ts rename to apps/signal/bug-in-effect/src/app/app.component.ts diff --git a/apps/rxjs/49-hold-to-save-button/src/app/app.config.ts b/apps/signal/bug-in-effect/src/app/app.config.ts similarity index 100% rename from apps/rxjs/49-hold-to-save-button/src/app/app.config.ts rename to apps/signal/bug-in-effect/src/app/app.config.ts diff --git a/apps/performance/35-memoization/src/assets/.gitkeep b/apps/signal/bug-in-effect/src/assets/.gitkeep similarity index 100% rename from apps/performance/35-memoization/src/assets/.gitkeep rename to apps/signal/bug-in-effect/src/assets/.gitkeep diff --git a/apps/nx/42-static-vs-dynamic-import/src/favicon.ico b/apps/signal/bug-in-effect/src/favicon.ico similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/src/favicon.ico rename to apps/signal/bug-in-effect/src/favicon.ico diff --git a/apps/signal/50-bug-in-effect/src/index.html b/apps/signal/bug-in-effect/src/index.html similarity index 100% rename from apps/signal/50-bug-in-effect/src/index.html rename to apps/signal/bug-in-effect/src/index.html diff --git a/apps/nx/42-static-vs-dynamic-import/src/main.ts b/apps/signal/bug-in-effect/src/main.ts similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/src/main.ts rename to apps/signal/bug-in-effect/src/main.ts diff --git a/apps/forms/41-control-value-accessor/src/styles.scss b/apps/signal/bug-in-effect/src/styles.scss similarity index 100% rename from apps/forms/41-control-value-accessor/src/styles.scss rename to apps/signal/bug-in-effect/src/styles.scss diff --git a/apps/forms/41-control-value-accessor/tailwind.config.js b/apps/signal/bug-in-effect/tailwind.config.js similarity index 100% rename from apps/forms/41-control-value-accessor/tailwind.config.js rename to apps/signal/bug-in-effect/tailwind.config.js diff --git a/apps/angular/32-change-detection-bug/tsconfig.app.json b/apps/signal/bug-in-effect/tsconfig.app.json similarity index 100% rename from apps/angular/32-change-detection-bug/tsconfig.app.json rename to apps/signal/bug-in-effect/tsconfig.app.json diff --git a/apps/angular/58-content-projection-condition/tsconfig.editor.json b/apps/signal/bug-in-effect/tsconfig.editor.json similarity index 100% rename from apps/angular/58-content-projection-condition/tsconfig.editor.json rename to apps/signal/bug-in-effect/tsconfig.editor.json diff --git a/apps/signal/50-bug-in-effect/tsconfig.json b/apps/signal/bug-in-effect/tsconfig.json similarity index 100% rename from apps/signal/50-bug-in-effect/tsconfig.json rename to apps/signal/bug-in-effect/tsconfig.json diff --git a/apps/nx/42-static-vs-dynamic-import/.eslintrc.json b/apps/signal/forms-and-signal/.eslintrc.json similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/.eslintrc.json rename to apps/signal/forms-and-signal/.eslintrc.json diff --git a/apps/signal/56-forms-and-signal/README.md b/apps/signal/forms-and-signal/README.md similarity index 100% rename from apps/signal/56-forms-and-signal/README.md rename to apps/signal/forms-and-signal/README.md diff --git a/apps/signal/56-forms-and-signal/project.json b/apps/signal/forms-and-signal/project.json similarity index 100% rename from apps/signal/56-forms-and-signal/project.json rename to apps/signal/forms-and-signal/project.json diff --git a/apps/performance/12-optimize-change-detection/src/favicon.ico b/apps/signal/forms-and-signal/public/favicon.ico similarity index 100% rename from apps/performance/12-optimize-change-detection/src/favicon.ico rename to apps/signal/forms-and-signal/public/favicon.ico diff --git a/apps/signal/56-forms-and-signal/src/app/app.component.ts b/apps/signal/forms-and-signal/src/app/app.component.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/app.component.ts rename to apps/signal/forms-and-signal/src/app/app.component.ts diff --git a/apps/signal/56-forms-and-signal/src/app/app.config.ts b/apps/signal/forms-and-signal/src/app/app.config.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/app.config.ts rename to apps/signal/forms-and-signal/src/app/app.config.ts diff --git a/apps/signal/56-forms-and-signal/src/app/app.routes.ts b/apps/signal/forms-and-signal/src/app/app.routes.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/app.routes.ts rename to apps/signal/forms-and-signal/src/app/app.routes.ts diff --git a/apps/signal/56-forms-and-signal/src/app/checkout.component.ts b/apps/signal/forms-and-signal/src/app/checkout.component.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/checkout.component.ts rename to apps/signal/forms-and-signal/src/app/checkout.component.ts diff --git a/apps/signal/56-forms-and-signal/src/app/dashboard.component.ts b/apps/signal/forms-and-signal/src/app/dashboard.component.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/dashboard.component.ts rename to apps/signal/forms-and-signal/src/app/dashboard.component.ts diff --git a/apps/signal/56-forms-and-signal/src/app/order.component.ts b/apps/signal/forms-and-signal/src/app/order.component.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/order.component.ts rename to apps/signal/forms-and-signal/src/app/order.component.ts diff --git a/apps/signal/56-forms-and-signal/src/app/payment.component.ts b/apps/signal/forms-and-signal/src/app/payment.component.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/payment.component.ts rename to apps/signal/forms-and-signal/src/app/payment.component.ts diff --git a/apps/signal/56-forms-and-signal/src/app/products.ts b/apps/signal/forms-and-signal/src/app/products.ts similarity index 100% rename from apps/signal/56-forms-and-signal/src/app/products.ts rename to apps/signal/forms-and-signal/src/app/products.ts diff --git a/apps/signal/56-forms-and-signal/src/index.html b/apps/signal/forms-and-signal/src/index.html similarity index 100% rename from apps/signal/56-forms-and-signal/src/index.html rename to apps/signal/forms-and-signal/src/index.html diff --git a/apps/performance/34-default-vs-onpush/src/main.ts b/apps/signal/forms-and-signal/src/main.ts similarity index 100% rename from apps/performance/34-default-vs-onpush/src/main.ts rename to apps/signal/forms-and-signal/src/main.ts diff --git a/apps/forms/48-avoid-losing-form-data/src/styles.scss b/apps/signal/forms-and-signal/src/styles.scss similarity index 100% rename from apps/forms/48-avoid-losing-form-data/src/styles.scss rename to apps/signal/forms-and-signal/src/styles.scss diff --git a/apps/nx/42-static-vs-dynamic-import/tailwind.config.js b/apps/signal/forms-and-signal/tailwind.config.js similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/tailwind.config.js rename to apps/signal/forms-and-signal/tailwind.config.js diff --git a/apps/angular/33-decoupling-components/tsconfig.app.json b/apps/signal/forms-and-signal/tsconfig.app.json similarity index 100% rename from apps/angular/33-decoupling-components/tsconfig.app.json rename to apps/signal/forms-and-signal/tsconfig.app.json diff --git a/apps/angular/59-content-projection-defer/tsconfig.editor.json b/apps/signal/forms-and-signal/tsconfig.editor.json similarity index 100% rename from apps/angular/59-content-projection-defer/tsconfig.editor.json rename to apps/signal/forms-and-signal/tsconfig.editor.json diff --git a/apps/signal/51-function-call-effect/tsconfig.json b/apps/signal/forms-and-signal/tsconfig.json similarity index 100% rename from apps/signal/51-function-call-effect/tsconfig.json rename to apps/signal/forms-and-signal/tsconfig.json diff --git a/apps/rxjs/11-high-order-operator-bug/.eslintrc.json b/apps/signal/function-call-effect/.eslintrc.json similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/.eslintrc.json rename to apps/signal/function-call-effect/.eslintrc.json diff --git a/apps/signal/51-function-call-effect/README.md b/apps/signal/function-call-effect/README.md similarity index 100% rename from apps/signal/51-function-call-effect/README.md rename to apps/signal/function-call-effect/README.md diff --git a/apps/signal/51-function-call-effect/project.json b/apps/signal/function-call-effect/project.json similarity index 100% rename from apps/signal/51-function-call-effect/project.json rename to apps/signal/function-call-effect/project.json diff --git a/apps/signal/51-function-call-effect/src/app/action.component.ts b/apps/signal/function-call-effect/src/app/action.component.ts similarity index 100% rename from apps/signal/51-function-call-effect/src/app/action.component.ts rename to apps/signal/function-call-effect/src/app/action.component.ts diff --git a/apps/signal/51-function-call-effect/src/app/app.component.ts b/apps/signal/function-call-effect/src/app/app.component.ts similarity index 100% rename from apps/signal/51-function-call-effect/src/app/app.component.ts rename to apps/signal/function-call-effect/src/app/app.component.ts diff --git a/apps/signal/43-signal-input/src/app/app.config.ts b/apps/signal/function-call-effect/src/app/app.config.ts similarity index 100% rename from apps/signal/43-signal-input/src/app/app.config.ts rename to apps/signal/function-call-effect/src/app/app.config.ts diff --git a/apps/signal/51-function-call-effect/src/app/user.service.ts b/apps/signal/function-call-effect/src/app/user.service.ts similarity index 100% rename from apps/signal/51-function-call-effect/src/app/user.service.ts rename to apps/signal/function-call-effect/src/app/user.service.ts diff --git a/apps/performance/36-ngfor-optimization/src/assets/.gitkeep b/apps/signal/function-call-effect/src/assets/.gitkeep similarity index 100% rename from apps/performance/36-ngfor-optimization/src/assets/.gitkeep rename to apps/signal/function-call-effect/src/assets/.gitkeep diff --git a/apps/performance/34-default-vs-onpush/src/favicon.ico b/apps/signal/function-call-effect/src/favicon.ico similarity index 100% rename from apps/performance/34-default-vs-onpush/src/favicon.ico rename to apps/signal/function-call-effect/src/favicon.ico diff --git a/apps/signal/51-function-call-effect/src/index.html b/apps/signal/function-call-effect/src/index.html similarity index 100% rename from apps/signal/51-function-call-effect/src/index.html rename to apps/signal/function-call-effect/src/index.html diff --git a/apps/performance/35-memoization/src/main.ts b/apps/signal/function-call-effect/src/main.ts similarity index 100% rename from apps/performance/35-memoization/src/main.ts rename to apps/signal/function-call-effect/src/main.ts diff --git a/apps/nx/42-static-vs-dynamic-import/src/styles.scss b/apps/signal/function-call-effect/src/styles.scss similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/src/styles.scss rename to apps/signal/function-call-effect/src/styles.scss diff --git a/apps/performance/34-default-vs-onpush/tailwind.config.js b/apps/signal/function-call-effect/tailwind.config.js similarity index 100% rename from apps/performance/34-default-vs-onpush/tailwind.config.js rename to apps/signal/function-call-effect/tailwind.config.js diff --git a/apps/angular/39-injection-token/tsconfig.app.json b/apps/signal/function-call-effect/tsconfig.app.json similarity index 100% rename from apps/angular/39-injection-token/tsconfig.app.json rename to apps/signal/function-call-effect/tsconfig.app.json diff --git a/apps/forms/48-avoid-losing-form-data/tsconfig.editor.json b/apps/signal/function-call-effect/tsconfig.editor.json similarity index 100% rename from apps/forms/48-avoid-losing-form-data/tsconfig.editor.json rename to apps/signal/function-call-effect/tsconfig.editor.json diff --git a/apps/signal/53-big-signal-performance/tsconfig.json b/apps/signal/function-call-effect/tsconfig.json similarity index 100% rename from apps/signal/53-big-signal-performance/tsconfig.json rename to apps/signal/function-call-effect/tsconfig.json diff --git a/apps/performance/40-web-workers/.eslintrc.json b/apps/signal/pipe-observable-to-signal/.eslintrc.json similarity index 100% rename from apps/performance/40-web-workers/.eslintrc.json rename to apps/signal/pipe-observable-to-signal/.eslintrc.json diff --git a/apps/signal/54-pipe-observable-to-signal/README.md b/apps/signal/pipe-observable-to-signal/README.md similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/README.md rename to apps/signal/pipe-observable-to-signal/README.md diff --git a/apps/signal/54-pipe-observable-to-signal/project.json b/apps/signal/pipe-observable-to-signal/project.json similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/project.json rename to apps/signal/pipe-observable-to-signal/project.json diff --git a/apps/signal/54-pipe-observable-to-signal/src/app/app.component.ts b/apps/signal/pipe-observable-to-signal/src/app/app.component.ts similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/app/app.component.ts rename to apps/signal/pipe-observable-to-signal/src/app/app.component.ts diff --git a/apps/signal/54-pipe-observable-to-signal/src/app/currency.pipe.ts b/apps/signal/pipe-observable-to-signal/src/app/currency.pipe.ts similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/app/currency.pipe.ts rename to apps/signal/pipe-observable-to-signal/src/app/currency.pipe.ts diff --git a/apps/signal/54-pipe-observable-to-signal/src/app/currency.service.ts b/apps/signal/pipe-observable-to-signal/src/app/currency.service.ts similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/app/currency.service.ts rename to apps/signal/pipe-observable-to-signal/src/app/currency.service.ts diff --git a/apps/signal/54-pipe-observable-to-signal/src/app/product-row.component.ts b/apps/signal/pipe-observable-to-signal/src/app/product-row.component.ts similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/app/product-row.component.ts rename to apps/signal/pipe-observable-to-signal/src/app/product-row.component.ts diff --git a/apps/signal/54-pipe-observable-to-signal/src/app/product.model.ts b/apps/signal/pipe-observable-to-signal/src/app/product.model.ts similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/app/product.model.ts rename to apps/signal/pipe-observable-to-signal/src/app/product.model.ts diff --git a/apps/performance/37-optimize-big-list/src/assets/.gitkeep b/apps/signal/pipe-observable-to-signal/src/assets/.gitkeep similarity index 100% rename from apps/performance/37-optimize-big-list/src/assets/.gitkeep rename to apps/signal/pipe-observable-to-signal/src/assets/.gitkeep diff --git a/apps/performance/35-memoization/src/favicon.ico b/apps/signal/pipe-observable-to-signal/src/favicon.ico similarity index 100% rename from apps/performance/35-memoization/src/favicon.ico rename to apps/signal/pipe-observable-to-signal/src/favicon.ico diff --git a/apps/signal/54-pipe-observable-to-signal/src/index.html b/apps/signal/pipe-observable-to-signal/src/index.html similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/index.html rename to apps/signal/pipe-observable-to-signal/src/index.html diff --git a/apps/performance/12-optimize-change-detection/src/main.ts b/apps/signal/pipe-observable-to-signal/src/main.ts similarity index 100% rename from apps/performance/12-optimize-change-detection/src/main.ts rename to apps/signal/pipe-observable-to-signal/src/main.ts diff --git a/apps/signal/54-pipe-observable-to-signal/src/styles.scss b/apps/signal/pipe-observable-to-signal/src/styles.scss similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/src/styles.scss rename to apps/signal/pipe-observable-to-signal/src/styles.scss diff --git a/apps/performance/35-memoization/tailwind.config.js b/apps/signal/pipe-observable-to-signal/tailwind.config.js similarity index 100% rename from apps/performance/35-memoization/tailwind.config.js rename to apps/signal/pipe-observable-to-signal/tailwind.config.js diff --git a/apps/angular/44-view-transition/tsconfig.app.json b/apps/signal/pipe-observable-to-signal/tsconfig.app.json similarity index 100% rename from apps/angular/44-view-transition/tsconfig.app.json rename to apps/signal/pipe-observable-to-signal/tsconfig.app.json diff --git a/apps/rxjs/49-hold-to-save-button/tsconfig.editor.json b/apps/signal/pipe-observable-to-signal/tsconfig.editor.json similarity index 100% rename from apps/rxjs/49-hold-to-save-button/tsconfig.editor.json rename to apps/signal/pipe-observable-to-signal/tsconfig.editor.json diff --git a/apps/signal/54-pipe-observable-to-signal/tsconfig.json b/apps/signal/pipe-observable-to-signal/tsconfig.json similarity index 100% rename from apps/signal/54-pipe-observable-to-signal/tsconfig.json rename to apps/signal/pipe-observable-to-signal/tsconfig.json diff --git a/apps/rxjs/49-hold-to-save-button/.eslintrc.json b/apps/signal/signal-input/.eslintrc.json similarity index 100% rename from apps/rxjs/49-hold-to-save-button/.eslintrc.json rename to apps/signal/signal-input/.eslintrc.json diff --git a/apps/signal/43-signal-input/README.md b/apps/signal/signal-input/README.md similarity index 100% rename from apps/signal/43-signal-input/README.md rename to apps/signal/signal-input/README.md diff --git a/apps/signal/43-signal-input/project.json b/apps/signal/signal-input/project.json similarity index 100% rename from apps/signal/43-signal-input/project.json rename to apps/signal/signal-input/project.json diff --git a/apps/signal/43-signal-input/src/app/app.component.ts b/apps/signal/signal-input/src/app/app.component.ts similarity index 100% rename from apps/signal/43-signal-input/src/app/app.component.ts rename to apps/signal/signal-input/src/app/app.component.ts diff --git a/apps/signal/50-bug-in-effect/src/app/app.config.ts b/apps/signal/signal-input/src/app/app.config.ts similarity index 100% rename from apps/signal/50-bug-in-effect/src/app/app.config.ts rename to apps/signal/signal-input/src/app/app.config.ts diff --git a/apps/signal/43-signal-input/src/app/user.component.ts b/apps/signal/signal-input/src/app/user.component.ts similarity index 100% rename from apps/signal/43-signal-input/src/app/user.component.ts rename to apps/signal/signal-input/src/app/user.component.ts diff --git a/apps/performance/40-web-workers/src/assets/.gitkeep b/apps/signal/signal-input/src/assets/.gitkeep similarity index 100% rename from apps/performance/40-web-workers/src/assets/.gitkeep rename to apps/signal/signal-input/src/assets/.gitkeep diff --git a/apps/performance/36-ngfor-optimization/src/favicon.ico b/apps/signal/signal-input/src/favicon.ico similarity index 100% rename from apps/performance/36-ngfor-optimization/src/favicon.ico rename to apps/signal/signal-input/src/favicon.ico diff --git a/apps/signal/43-signal-input/src/index.html b/apps/signal/signal-input/src/index.html similarity index 100% rename from apps/signal/43-signal-input/src/index.html rename to apps/signal/signal-input/src/index.html diff --git a/apps/performance/36-ngfor-optimization/src/main.ts b/apps/signal/signal-input/src/main.ts similarity index 100% rename from apps/performance/36-ngfor-optimization/src/main.ts rename to apps/signal/signal-input/src/main.ts diff --git a/apps/performance/34-default-vs-onpush/src/styles.scss b/apps/signal/signal-input/src/styles.scss similarity index 100% rename from apps/performance/34-default-vs-onpush/src/styles.scss rename to apps/signal/signal-input/src/styles.scss diff --git a/apps/performance/36-ngfor-optimization/tailwind.config.js b/apps/signal/signal-input/tailwind.config.js similarity index 100% rename from apps/performance/36-ngfor-optimization/tailwind.config.js rename to apps/signal/signal-input/tailwind.config.js diff --git a/apps/angular/45-react-in-angular/tsconfig.app.json b/apps/signal/signal-input/tsconfig.app.json similarity index 100% rename from apps/angular/45-react-in-angular/tsconfig.app.json rename to apps/signal/signal-input/tsconfig.app.json diff --git a/apps/nx/42-static-vs-dynamic-import/tsconfig.editor.json b/apps/signal/signal-input/tsconfig.editor.json similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/tsconfig.editor.json rename to apps/signal/signal-input/tsconfig.editor.json diff --git a/apps/nx/42-static-vs-dynamic-import/tsconfig.json b/apps/signal/signal-input/tsconfig.json similarity index 100% rename from apps/nx/42-static-vs-dynamic-import/tsconfig.json rename to apps/signal/signal-input/tsconfig.json diff --git a/apps/performance/35-memoization/.eslintrc.json b/apps/standalone/module-to-standalone/.eslintrc.json similarity index 100% rename from apps/performance/35-memoization/.eslintrc.json rename to apps/standalone/module-to-standalone/.eslintrc.json diff --git a/apps/angular/31-module-to-standalone/README.md b/apps/standalone/module-to-standalone/README.md similarity index 100% rename from apps/angular/31-module-to-standalone/README.md rename to apps/standalone/module-to-standalone/README.md diff --git a/apps/angular/31-module-to-standalone/project.json b/apps/standalone/module-to-standalone/project.json similarity index 100% rename from apps/angular/31-module-to-standalone/project.json rename to apps/standalone/module-to-standalone/project.json diff --git a/apps/angular/31-module-to-standalone/src/app/app.component.ts b/apps/standalone/module-to-standalone/src/app/app.component.ts similarity index 100% rename from apps/angular/31-module-to-standalone/src/app/app.component.ts rename to apps/standalone/module-to-standalone/src/app/app.component.ts diff --git a/apps/angular/31-module-to-standalone/src/app/app.module.ts b/apps/standalone/module-to-standalone/src/app/app.module.ts similarity index 100% rename from apps/angular/31-module-to-standalone/src/app/app.module.ts rename to apps/standalone/module-to-standalone/src/app/app.module.ts diff --git a/apps/rxjs/11-high-order-operator-bug/src/assets/.gitkeep b/apps/standalone/module-to-standalone/src/assets/.gitkeep similarity index 100% rename from apps/rxjs/11-high-order-operator-bug/src/assets/.gitkeep rename to apps/standalone/module-to-standalone/src/assets/.gitkeep diff --git a/apps/performance/37-optimize-big-list/src/favicon.ico b/apps/standalone/module-to-standalone/src/favicon.ico similarity index 100% rename from apps/performance/37-optimize-big-list/src/favicon.ico rename to apps/standalone/module-to-standalone/src/favicon.ico diff --git a/apps/angular/31-module-to-standalone/src/index.html b/apps/standalone/module-to-standalone/src/index.html similarity index 100% rename from apps/angular/31-module-to-standalone/src/index.html rename to apps/standalone/module-to-standalone/src/index.html diff --git a/apps/angular/52-lazy-load-component/src/main.ts b/apps/standalone/module-to-standalone/src/main.ts similarity index 100% rename from apps/angular/52-lazy-load-component/src/main.ts rename to apps/standalone/module-to-standalone/src/main.ts diff --git a/apps/performance/35-memoization/src/styles.scss b/apps/standalone/module-to-standalone/src/styles.scss similarity index 100% rename from apps/performance/35-memoization/src/styles.scss rename to apps/standalone/module-to-standalone/src/styles.scss diff --git a/apps/angular/31-module-to-standalone/tailwind.config.js b/apps/standalone/module-to-standalone/tailwind.config.js similarity index 100% rename from apps/angular/31-module-to-standalone/tailwind.config.js rename to apps/standalone/module-to-standalone/tailwind.config.js diff --git a/apps/standalone/module-to-standalone/tsconfig.app.json b/apps/standalone/module-to-standalone/tsconfig.app.json new file mode 100644 index 000000000..403fe4f54 --- /dev/null +++ b/apps/standalone/module-to-standalone/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "types": [], + "moduleResolution": "bundler" + }, + "files": [ + "src/main.ts" + ], + "include": ["src/**/*.d.ts"], + "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] +} diff --git a/apps/angular/31-module-to-standalone/tsconfig.editor.json b/apps/standalone/module-to-standalone/tsconfig.editor.json similarity index 71% rename from apps/angular/31-module-to-standalone/tsconfig.editor.json rename to apps/standalone/module-to-standalone/tsconfig.editor.json index ccb35c609..91f5718dc 100644 --- a/apps/angular/31-module-to-standalone/tsconfig.editor.json +++ b/apps/standalone/module-to-standalone/tsconfig.editor.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "include": [ "src/**/*.ts", - "../../../libs/module-to-standalone/shell/src/lib/main-shell.routes.ts", + "../../../libs/module-to-standalone/shell/src/lib/main-shell.routes.ts", "../../../libs/module-to-standalone/shell/src/lib/main-shell.component.ts" ], "compilerOptions": { diff --git a/apps/angular/33-decoupling-components/tsconfig.json b/apps/standalone/module-to-standalone/tsconfig.json similarity index 100% rename from apps/angular/33-decoupling-components/tsconfig.json rename to apps/standalone/module-to-standalone/tsconfig.json diff --git a/apps/testing/17-router/.eslintrc.json b/apps/testing/17-router/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/17-router/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/17-router/README.md b/apps/testing/17-router/README.md deleted file mode 100644 index fe9a75448..000000000 --- a/apps/testing/17-router/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Router - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-router -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/17-router/). diff --git a/apps/testing/17-router/cypress.config.ts b/apps/testing/17-router/cypress.config.ts deleted file mode 100644 index 3738464ee..000000000 --- a/apps/testing/17-router/cypress.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; -import { defineConfig } from 'cypress'; - -export default defineConfig({ - component: { - ...nxComponentTestingPreset(__filename), - }, -}); diff --git a/apps/testing/17-router/cypress/fixtures/example.json b/apps/testing/17-router/cypress/fixtures/example.json deleted file mode 100644 index 02e425437..000000000 --- a/apps/testing/17-router/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/apps/testing/17-router/cypress/support/commands.ts b/apps/testing/17-router/cypress/support/commands.ts deleted file mode 100644 index b5d8a9582..000000000 --- a/apps/testing/17-router/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { mount } from 'cypress/angular'; - -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - mount: typeof mount; - } - } -} - -Cypress.Commands.add('mount', mount); diff --git a/apps/testing/17-router/cypress/support/component-index.html b/apps/testing/17-router/cypress/support/component-index.html deleted file mode 100644 index 208ea7126..000000000 --- a/apps/testing/17-router/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - router-testing Components App - - -
- - diff --git a/apps/testing/17-router/cypress/support/component.ts b/apps/testing/17-router/cypress/support/component.ts deleted file mode 100644 index e7c3e3cbc..000000000 --- a/apps/testing/17-router/cypress/support/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your subscription files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.ts using ES2015 syntax: -import './commands'; diff --git a/apps/testing/17-router/cypress/tsconfig.json b/apps/testing/17-router/cypress/tsconfig.json deleted file mode 100644 index 918d96378..000000000 --- a/apps/testing/17-router/cypress/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["cypress", "node"], - "sourceMap": false - }, - "include": [ - "support/**/*.ts", - "../cypress.config.ts", - "../**/*.cy.ts", - "../**/*.cy.tsx", - "../**/*.cy.js", - "../**/*.cy.jsx", - "../**/*.d.ts" - ] -} diff --git a/apps/testing/17-router/jest.config.ts b/apps/testing/17-router/jest.config.ts deleted file mode 100644 index 997c99f0e..000000000 --- a/apps/testing/17-router/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-router', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - globals: {}, - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/17-router/project.json b/apps/testing/17-router/project.json deleted file mode 100644 index dba3c0666..000000000 --- a/apps/testing/17-router/project.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "testing-router", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/testing/17-router/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/17-router", - "index": "apps/testing/17-router/src/index.html", - "main": "apps/testing/17-router/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/17-router/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/testing/17-router/src/favicon.ico", - "apps/testing/17-router/src/assets" - ], - "styles": ["apps/testing/17-router/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-router:build:production" - }, - "development": { - "buildTarget": "testing-router:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-router:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - }, - "component-test": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/testing/17-router/cypress.config.ts", - "testingType": "component", - "skipServe": true, - "devServerTarget": "testing-router:build" - } - } - } -} diff --git a/apps/testing/17-router/src/app/app.component.cy.ts b/apps/testing/17-router/src/app/app.component.cy.ts deleted file mode 100644 index 50ce839a0..000000000 --- a/apps/testing/17-router/src/app/app.component.cy.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { AppComponent } from './app.component'; - -describe(AppComponent.name, () => { - describe('Given no search criteria', () => { - it('Then shows error message and disabled button', () => { - //todo - }); - }); - - describe('Given a search criteria with no book match', () => { - it('Then shows No book found', () => { - //todo - }); - }); - - describe('Given a search criteria with one book match', () => { - it('Then shows One book and no error', () => { - //todo - }); - }); - - describe('Given a search criteria in Uppercase with one book match', () => { - it('Then shows One book and no error', () => { - //todo - }); - }); - - describe('Given a search criteria with multple books matches', () => { - it('Then shows a list of books', () => { - //todo - }); - }); -}); diff --git a/apps/testing/17-router/src/app/app.component.spec.ts b/apps/testing/17-router/src/app/app.component.spec.ts deleted file mode 100644 index 6cf2f4aed..000000000 --- a/apps/testing/17-router/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -describe('AppComponent', () => { - describe('Given no search criteria', () => { - it('Then shows error message and disabled button', async () => { - //todo - }); - }); - - describe('Given a search criteria with no book match', () => { - it('Then shows No book found', async () => { - //todo - }); - }); - - describe('Given a search criteria with one book match', () => { - it('Then shows One book and no error', async () => { - //todo - }); - }); - - describe('Given a search criteria in Uppercase with one book match', () => { - it('Then shows One book and no error', async () => { - //todo - }); - }); - - describe('Given a search criteria with multple books matches', () => { - it('Then shows a list of books', async () => { - //todo - }); - }); -}); diff --git a/apps/testing/17-router/src/app/app.component.ts b/apps/testing/17-router/src/app/app.component.ts deleted file mode 100644 index cc6298f17..000000000 --- a/apps/testing/17-router/src/app/app.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - imports: [RouterOutlet, RouterLink], - selector: 'app-root', - styles: [ - ` - h1 { - margin-bottom: 0; - } - nav a { - padding: 1rem; - text-decoration: none; - margin-top: 10px; - display: inline-block; - background-color: #e8e8e8; - color: #3d3d3d; - border-radius: 4px; - margin-bottom: 10px; - } - nav a:hover { - color: white; - background-color: #42545c; - } - nav a.active { - background-color: black; - } - `, - ], - template: ` -

Library

- - - - - `, -}) -export class AppComponent {} diff --git a/apps/testing/17-router/src/app/app.config.ts b/apps/testing/17-router/src/app/app.config.ts deleted file mode 100644 index 66ab7f73f..000000000 --- a/apps/testing/17-router/src/app/app.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { appRoutes } from './app.routes'; -export const appConfig: ApplicationConfig = { - providers: [provideRouter(appRoutes)], -}; diff --git a/apps/testing/17-router/src/app/app.routes.ts b/apps/testing/17-router/src/app/app.routes.ts deleted file mode 100644 index 92763142e..000000000 --- a/apps/testing/17-router/src/app/app.routes.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ActivatedRouteSnapshot, Route } from '@angular/router'; -import { bookGuard } from './book.guard'; - -export const appRoutes: Route[] = [ - { - path: '', - pathMatch: 'full', - redirectTo: 'search', - }, - { - path: 'search', - loadComponent: () => import('./search.component'), - }, - { - path: 'shelf', - canActivate: [(route: ActivatedRouteSnapshot) => bookGuard(route)], - loadComponent: () => import('./shelf.component'), - }, - { - path: 'no-result', - loadComponent: () => import('./no-book-search.component'), - }, - { - path: '**', - pathMatch: 'full', - redirectTo: 'search', - }, -]; diff --git a/apps/testing/17-router/src/app/book.guard.ts b/apps/testing/17-router/src/app/book.guard.ts deleted file mode 100644 index 1419047a2..000000000 --- a/apps/testing/17-router/src/app/book.guard.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { inject } from '@angular/core'; -import { ActivatedRouteSnapshot, Router } from '@angular/router'; -import { availableBooks } from './book.model'; - -export const bookGuard = ( - route: ActivatedRouteSnapshot, - router = inject(Router), -) => { - const searchParam = route.queryParams?.['book'].toLowerCase(); - - const isBookAvailable = - !!searchParam && - availableBooks.some( - (b) => - b.author.toLowerCase().includes(searchParam) || - b.name.toLowerCase().includes(searchParam), - ); - - return isBookAvailable || router.parseUrl('no-result'); -}; diff --git a/apps/testing/17-router/src/app/book.model.ts b/apps/testing/17-router/src/app/book.model.ts deleted file mode 100644 index 5cb7c8007..000000000 --- a/apps/testing/17-router/src/app/book.model.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface Book { - name: string; - author: string; -} - -export const availableBooks = [ - { name: 'To Kill a Mockingbird', author: 'Harper Lee' }, - { name: '1984', author: 'George Orwell' }, - { name: 'The Catcher in the Rye', author: 'J.D. Salinger' }, - { name: 'The Great Gats', author: 'F. Scott Fitzgerald' }, - { name: 'Pride and Prejudice', author: 'Jane Austen' }, - { name: 'The Hobbit', author: 'J.R.R. Tolkien' }, - { name: 'The Lord of the Rings', author: 'J.R.R. Tolkien' }, - { name: "Harry Potter and the Philosopher's Stone", author: 'J.K. Rowling' }, - { name: 'The Hunger Games', author: 'Suzanne Collins' }, - { name: 'Animal Farm', author: 'George Orwell' }, -]; diff --git a/apps/testing/17-router/src/app/no-book-search.component.ts b/apps/testing/17-router/src/app/no-book-search.component.ts deleted file mode 100644 index d16c7478d..000000000 --- a/apps/testing/17-router/src/app/no-book-search.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; - -@Component({ - template: ` -
No book found for this search
- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export default class ShelfComponent {} diff --git a/apps/testing/17-router/src/app/search.component.ts b/apps/testing/17-router/src/app/search.component.ts deleted file mode 100644 index b35db308c..000000000 --- a/apps/testing/17-router/src/app/search.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms'; -import { RouterLink, RouterLinkActive } from '@angular/router'; -import { availableBooks } from './book.model'; - -@Component({ - imports: [ReactiveFormsModule, RouterLink, RouterLinkActive], - styles: [ - ` - :host { - display: flex; - flex-direction: column; - gap: 10px; - } - - .error { - color: red; - } - - button { - width: 300px; - padding: 5px; - border-radius: 5px; - } - - .search label { - margin-right: 15px; - } - `, - ], - template: ` - - -
-

List of books available:

-
    - @for (book of books; track $index) { -
  • {{ book.name }} by {{ book.author }}
  • - } -
-
- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export default class SearchComponent { - searchBook = new FormControl('', Validators.required); - books = availableBooks; -} diff --git a/apps/testing/17-router/src/app/shelf.component.ts b/apps/testing/17-router/src/app/shelf.component.ts deleted file mode 100644 index 238d9836c..000000000 --- a/apps/testing/17-router/src/app/shelf.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { map } from 'rxjs'; -import { availableBooks } from './book.model'; - -@Component({ - selector: 'app-shelf', - imports: [AsyncPipe], - template: ` -
    - @for (book of books | async; track book) { -
  • Borrowed Book: {{ book.name }} by {{ book.author }}
  • - } -
- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export default class ShelfComponent { - readonly books = inject(ActivatedRoute).queryParams.pipe( - map((params) => params?.['book'].toLowerCase()), - map((param) => - availableBooks.filter( - (b) => - b.name.toLowerCase().includes(param) || - b.author.toLowerCase().includes(param), - ), - ), - ); -} diff --git a/apps/testing/17-router/src/assets/.gitkeep b/apps/testing/17-router/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/17-router/src/favicon.ico b/apps/testing/17-router/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/17-router/src/favicon.ico and /dev/null differ diff --git a/apps/testing/17-router/src/index.html b/apps/testing/17-router/src/index.html deleted file mode 100644 index 80ec9bf77..000000000 --- a/apps/testing/17-router/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-router - - - - - - - - diff --git a/apps/testing/17-router/src/main.ts b/apps/testing/17-router/src/main.ts deleted file mode 100644 index 7961924bf..000000000 --- a/apps/testing/17-router/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/testing/17-router/src/styles.scss b/apps/testing/17-router/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/testing/17-router/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/testing/17-router/src/test-setup.ts b/apps/testing/17-router/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/17-router/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/17-router/tsconfig.app.json b/apps/testing/17-router/tsconfig.app.json deleted file mode 100644 index 5fdad8685..000000000 --- a/apps/testing/17-router/tsconfig.app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "cypress/**/*", - "cypress.config.ts", - "**/*.cy.ts", - "**/*.cy.js", - "**/*.cy.tsx", - "**/*.cy.jsx" - ] -} diff --git a/apps/testing/17-router/tsconfig.editor.json b/apps/testing/17-router/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/17-router/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/17-router/tsconfig.json b/apps/testing/17-router/tsconfig.json deleted file mode 100644 index 3879b94cd..000000000 --- a/apps/testing/17-router/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./cypress/tsconfig.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/17-router/tsconfig.spec.json b/apps/testing/17-router/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/17-router/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/18-nested-components/.eslintrc.json b/apps/testing/18-nested-components/.eslintrc.json deleted file mode 100644 index bd4886462..000000000 --- a/apps/testing/18-nested-components/.eslintrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": {}, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/18-nested-components/README.md b/apps/testing/18-nested-components/README.md deleted file mode 100644 index 659b9e365..000000000 --- a/apps/testing/18-nested-components/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Nested Components - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-nested-components -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/18-nested-comp/). diff --git a/apps/testing/18-nested-components/cypress.config.ts b/apps/testing/18-nested-components/cypress.config.ts deleted file mode 100644 index 3738464ee..000000000 --- a/apps/testing/18-nested-components/cypress.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; -import { defineConfig } from 'cypress'; - -export default defineConfig({ - component: { - ...nxComponentTestingPreset(__filename), - }, -}); diff --git a/apps/testing/18-nested-components/cypress/fixtures/example.json b/apps/testing/18-nested-components/cypress/fixtures/example.json deleted file mode 100644 index 02e425437..000000000 --- a/apps/testing/18-nested-components/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/apps/testing/18-nested-components/cypress/support/commands.ts b/apps/testing/18-nested-components/cypress/support/commands.ts deleted file mode 100644 index b5d8a9582..000000000 --- a/apps/testing/18-nested-components/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { mount } from 'cypress/angular'; - -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - mount: typeof mount; - } - } -} - -Cypress.Commands.add('mount', mount); diff --git a/apps/testing/18-nested-components/cypress/support/component-index.html b/apps/testing/18-nested-components/cypress/support/component-index.html deleted file mode 100644 index f1b19ddbc..000000000 --- a/apps/testing/18-nested-components/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - testing-nested Components App - - -
- - diff --git a/apps/testing/18-nested-components/cypress/support/component.ts b/apps/testing/18-nested-components/cypress/support/component.ts deleted file mode 100644 index e7c3e3cbc..000000000 --- a/apps/testing/18-nested-components/cypress/support/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your subscription files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.ts using ES2015 syntax: -import './commands'; diff --git a/apps/testing/18-nested-components/cypress/tsconfig.json b/apps/testing/18-nested-components/cypress/tsconfig.json deleted file mode 100644 index 918d96378..000000000 --- a/apps/testing/18-nested-components/cypress/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["cypress", "node"], - "sourceMap": false - }, - "include": [ - "support/**/*.ts", - "../cypress.config.ts", - "../**/*.cy.ts", - "../**/*.cy.tsx", - "../**/*.cy.js", - "../**/*.cy.jsx", - "../**/*.d.ts" - ] -} diff --git a/apps/testing/18-nested-components/jest.config.ts b/apps/testing/18-nested-components/jest.config.ts deleted file mode 100644 index c77df55f9..000000000 --- a/apps/testing/18-nested-components/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-nested-components', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/18-nested-components/project.json b/apps/testing/18-nested-components/project.json deleted file mode 100644 index aabd0f2db..000000000 --- a/apps/testing/18-nested-components/project.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "testing-nested-components", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/testing/18-nested-components/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/18-nested-components", - "index": "apps/testing/18-nested-components/src/index.html", - "main": "apps/testing/18-nested-components/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/18-nested-components/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/testing/18-nested-components/src/favicon.ico", - "apps/testing/18-nested-components/src/assets" - ], - "styles": ["apps/testing/18-nested-components/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-nested-components:build:production" - }, - "development": { - "buildTarget": "testing-nested-components:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-nested-components:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - }, - "component-test": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/testing/18-nested-components/cypress.config.ts", - "testingType": "component", - "skipServe": true, - "devServerTarget": "testing-nested-components:build" - } - } - } -} diff --git a/apps/testing/18-nested-components/src/app/app.component.ts b/apps/testing/18-nested-components/src/app/app.component.ts deleted file mode 100644 index 84b0df68a..000000000 --- a/apps/testing/18-nested-components/src/app/app.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; -import { ChildComponent } from './child.component'; - -@Component({ - imports: [ChildComponent], - selector: 'app-root', - template: ` - - `, -}) -export class AppComponent {} diff --git a/apps/testing/18-nested-components/src/app/child.component.cy.ts b/apps/testing/18-nested-components/src/app/child.component.cy.ts deleted file mode 100644 index 1f20b225c..000000000 --- a/apps/testing/18-nested-components/src/app/child.component.cy.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ChildComponent } from './child.component'; - -describe('ChildComponent', () => { - const setup = () => { - cy.mount(ChildComponent); - }; - describe('When typing nothing and clicking on Validate', () => { - test('Then show "Title is required" error message and no http request has been sent', async () => { - setup(); - }); - }); - - describe('When typing "Good" and clicking on Validate', () => { - test('Then show "Title is Good" message, no error message and send a http request to the backend', async () => { - setup(); - }); - }); -}); diff --git a/apps/testing/18-nested-components/src/app/child.component.spec.ts b/apps/testing/18-nested-components/src/app/child.component.spec.ts deleted file mode 100644 index d03b6e5b7..000000000 --- a/apps/testing/18-nested-components/src/app/child.component.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { render } from '@testing-library/angular'; -import { ChildComponent } from './child.component'; - -describe('ChildComponent', () => { - describe('When typing nothing and clicking on Validate', () => { - test('Then show "Title is required" error message and no http request has been sent', async () => { - await render(ChildComponent); - }); - }); - - describe('When typing "Good" and clicking on Validate', () => { - test('Then show "Title is Good" message, no error message and send a http request to the backend', async () => { - await render(ChildComponent); - }); - }); -}); diff --git a/apps/testing/18-nested-components/src/app/child.component.ts b/apps/testing/18-nested-components/src/app/child.component.ts deleted file mode 100644 index 7ead519f4..000000000 --- a/apps/testing/18-nested-components/src/app/child.component.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - inject, - input, - output, -} from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { HttpService } from './http.service'; - -@Component({ - selector: 'app-input', - imports: [ReactiveFormsModule], - template: ` - - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class InputComponent { - title = new FormControl('', { nonNullable: true }); -} - -@Component({ - selector: 'result', - template: ` -

Title is {{ title() }}

- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ResultComponent { - title = input(''); -} - -@Component({ - selector: 'app-button', - template: ` - - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ButtonComponent { - validate = output(); -} - -@Component({ - selector: 'app-error', - template: ` -

Title is required !!!

- `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ErrorComponent {} - -@Component({ - selector: 'app-child', - imports: [], - template: ` - - - - @if (showError) { - - } - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ChildComponent { - http = inject(HttpService); - - showError = false; - - submit(title: string) { - this.showError = false; - if (title === '') { - this.showError = true; - return; - } - - this.http.sendTitle(title); - } -} diff --git a/apps/testing/18-nested-components/src/app/http.service.ts b/apps/testing/18-nested-components/src/app/http.service.ts deleted file mode 100644 index 846be5598..000000000 --- a/apps/testing/18-nested-components/src/app/http.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ providedIn: 'root' }) -export class HttpService { - sendTitle(title: string) { - console.log(`${title} has been sent !!!`); - } -} diff --git a/apps/testing/18-nested-components/src/assets/.gitkeep b/apps/testing/18-nested-components/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/18-nested-components/src/favicon.ico b/apps/testing/18-nested-components/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/18-nested-components/src/favicon.ico and /dev/null differ diff --git a/apps/testing/18-nested-components/src/index.html b/apps/testing/18-nested-components/src/index.html deleted file mode 100644 index 5f7055208..000000000 --- a/apps/testing/18-nested-components/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-nested-components - - - - - - - - diff --git a/apps/testing/18-nested-components/src/main.ts b/apps/testing/18-nested-components/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/testing/18-nested-components/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/testing/18-nested-components/src/styles.scss b/apps/testing/18-nested-components/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/testing/18-nested-components/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/testing/18-nested-components/src/test-setup.ts b/apps/testing/18-nested-components/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/18-nested-components/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/18-nested-components/tsconfig.app.json b/apps/testing/18-nested-components/tsconfig.app.json deleted file mode 100644 index 5fdad8685..000000000 --- a/apps/testing/18-nested-components/tsconfig.app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "cypress/**/*", - "cypress.config.ts", - "**/*.cy.ts", - "**/*.cy.js", - "**/*.cy.tsx", - "**/*.cy.jsx" - ] -} diff --git a/apps/testing/18-nested-components/tsconfig.editor.json b/apps/testing/18-nested-components/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/18-nested-components/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/18-nested-components/tsconfig.json b/apps/testing/18-nested-components/tsconfig.json deleted file mode 100644 index 3879b94cd..000000000 --- a/apps/testing/18-nested-components/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./cypress/tsconfig.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/18-nested-components/tsconfig.spec.json b/apps/testing/18-nested-components/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/18-nested-components/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/19-input-output/.eslintrc.json b/apps/testing/19-input-output/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/19-input-output/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/19-input-output/README.md b/apps/testing/19-input-output/README.md deleted file mode 100644 index 59b5fff5d..000000000 --- a/apps/testing/19-input-output/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Input Output - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-input-output -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/19-input-output/). diff --git a/apps/testing/19-input-output/cypress.config.ts b/apps/testing/19-input-output/cypress.config.ts deleted file mode 100644 index 3738464ee..000000000 --- a/apps/testing/19-input-output/cypress.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; -import { defineConfig } from 'cypress'; - -export default defineConfig({ - component: { - ...nxComponentTestingPreset(__filename), - }, -}); diff --git a/apps/testing/19-input-output/cypress/fixtures/example.json b/apps/testing/19-input-output/cypress/fixtures/example.json deleted file mode 100644 index 02e425437..000000000 --- a/apps/testing/19-input-output/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/apps/testing/19-input-output/cypress/support/commands.ts b/apps/testing/19-input-output/cypress/support/commands.ts deleted file mode 100644 index b5d8a9582..000000000 --- a/apps/testing/19-input-output/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { mount } from 'cypress/angular'; - -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - mount: typeof mount; - } - } -} - -Cypress.Commands.add('mount', mount); diff --git a/apps/testing/19-input-output/cypress/support/component-index.html b/apps/testing/19-input-output/cypress/support/component-index.html deleted file mode 100644 index 57debcfad..000000000 --- a/apps/testing/19-input-output/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - testing-input-output Components App - - -
- - diff --git a/apps/testing/19-input-output/cypress/support/component.ts b/apps/testing/19-input-output/cypress/support/component.ts deleted file mode 100644 index e7c3e3cbc..000000000 --- a/apps/testing/19-input-output/cypress/support/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your subscription files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.ts using ES2015 syntax: -import './commands'; diff --git a/apps/testing/19-input-output/cypress/tsconfig.json b/apps/testing/19-input-output/cypress/tsconfig.json deleted file mode 100644 index 918d96378..000000000 --- a/apps/testing/19-input-output/cypress/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["cypress", "node"], - "sourceMap": false - }, - "include": [ - "support/**/*.ts", - "../cypress.config.ts", - "../**/*.cy.ts", - "../**/*.cy.tsx", - "../**/*.cy.js", - "../**/*.cy.jsx", - "../**/*.d.ts" - ] -} diff --git a/apps/testing/19-input-output/jest.config.ts b/apps/testing/19-input-output/jest.config.ts deleted file mode 100644 index 63370e2a3..000000000 --- a/apps/testing/19-input-output/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-input-output', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/19-input-output/project.json b/apps/testing/19-input-output/project.json deleted file mode 100644 index ae92fe796..000000000 --- a/apps/testing/19-input-output/project.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "testing-input-output", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/testing/19-input-output/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/19-input-output", - "index": "apps/testing/19-input-output/src/index.html", - "main": "apps/testing/19-input-output/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/19-input-output/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/testing/19-input-output/src/favicon.ico", - "apps/testing/19-input-output/src/assets" - ], - "styles": ["apps/testing/19-input-output/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-input-output:build:production" - }, - "development": { - "buildTarget": "testing-input-output:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-input-output:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - }, - "component-test": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/testing/19-input-output/cypress.config.ts", - "testingType": "component", - "skipServe": true, - "devServerTarget": "testing-input-output:build" - } - } - } -} diff --git a/apps/testing/19-input-output/src/app/app.component.ts b/apps/testing/19-input-output/src/app/app.component.ts deleted file mode 100644 index 7e9e0f78a..000000000 --- a/apps/testing/19-input-output/src/app/app.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { CounterComponent } from './counter.component'; - -@Component({ - imports: [CounterComponent], - selector: 'app-root', - template: ` - - `, -}) -export class AppComponent { - log(counter: number) { - console.log('output log', counter); - } -} diff --git a/apps/testing/19-input-output/src/app/counter.component.cy.ts b/apps/testing/19-input-output/src/app/counter.component.cy.ts deleted file mode 100644 index 17a1815c8..000000000 --- a/apps/testing/19-input-output/src/app/counter.component.cy.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CounterComponent } from './counter.component'; - -describe(CounterComponent.name, () => { - describe('Given an initualValue of 10', () => { - it('listen to output using createOutputSpy', () => { - cy.mount(CounterComponent); - }); - - it('listen to output using autoSpyOutputs', () => { - cy.mount(CounterComponent); - }); - }); -}); diff --git a/apps/testing/19-input-output/src/app/counter.component.spec.ts b/apps/testing/19-input-output/src/app/counter.component.spec.ts deleted file mode 100644 index 15110bcf6..000000000 --- a/apps/testing/19-input-output/src/app/counter.component.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { render } from '@testing-library/angular'; -import { CounterComponent } from './counter.component'; - -describe('CounterComponent', () => { - describe('Given an initualValue of 10', () => { - test('Then counterValue is 10', async () => { - await render(CounterComponent); - }); - - describe('When clicking 5 times on increment button', () => { - test('Then counterValue is 15', async () => { - await render(CounterComponent); - }); - }); - - describe('When clicking 2 times on decrement button', () => { - test('Then counterValue is 8', async () => { - await render(CounterComponent); - }); - describe('When clicking on Send ', () => { - test('Then emitted value is 8', async () => { - await render(CounterComponent); - }); - }); - }); - }); -}); diff --git a/apps/testing/19-input-output/src/app/counter.component.ts b/apps/testing/19-input-output/src/app/counter.component.ts deleted file mode 100644 index df1eed103..000000000 --- a/apps/testing/19-input-output/src/app/counter.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - input, - linkedSignal, - output, -} from '@angular/core'; - -@Component({ - selector: 'app-counter', - template: ` -

Counter: {{ counter() }}

- - - - `, - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class CounterComponent { - initialValue = input.required(); - public counter = linkedSignal(() => this.initialValue()); - - send = output(); - - public increment = () => { - this.counter.set(this.counter() + 1); - }; - - public decrement = () => { - this.counter.set(this.counter() - 1); - }; -} diff --git a/apps/testing/19-input-output/src/assets/.gitkeep b/apps/testing/19-input-output/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/19-input-output/src/favicon.ico b/apps/testing/19-input-output/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/19-input-output/src/favicon.ico and /dev/null differ diff --git a/apps/testing/19-input-output/src/index.html b/apps/testing/19-input-output/src/index.html deleted file mode 100644 index a5cd1c5da..000000000 --- a/apps/testing/19-input-output/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-input-ouput - - - - - - - - diff --git a/apps/testing/19-input-output/src/main.ts b/apps/testing/19-input-output/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/testing/19-input-output/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/testing/19-input-output/src/styles.scss b/apps/testing/19-input-output/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/testing/19-input-output/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/testing/19-input-output/src/test-setup.ts b/apps/testing/19-input-output/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/19-input-output/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/19-input-output/tsconfig.app.json b/apps/testing/19-input-output/tsconfig.app.json deleted file mode 100644 index 5fdad8685..000000000 --- a/apps/testing/19-input-output/tsconfig.app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "cypress/**/*", - "cypress.config.ts", - "**/*.cy.ts", - "**/*.cy.js", - "**/*.cy.tsx", - "**/*.cy.jsx" - ] -} diff --git a/apps/testing/19-input-output/tsconfig.editor.json b/apps/testing/19-input-output/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/19-input-output/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/19-input-output/tsconfig.json b/apps/testing/19-input-output/tsconfig.json deleted file mode 100644 index 3879b94cd..000000000 --- a/apps/testing/19-input-output/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./cypress/tsconfig.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/19-input-output/tsconfig.spec.json b/apps/testing/19-input-output/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/19-input-output/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/20-modal/.eslintrc.json b/apps/testing/20-modal/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/20-modal/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/20-modal/README.md b/apps/testing/20-modal/README.md deleted file mode 100644 index 08737d5a0..000000000 --- a/apps/testing/20-modal/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Modal - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-modal -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/20-modal/). diff --git a/apps/testing/20-modal/cypress.config.ts b/apps/testing/20-modal/cypress.config.ts deleted file mode 100644 index 3738464ee..000000000 --- a/apps/testing/20-modal/cypress.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; -import { defineConfig } from 'cypress'; - -export default defineConfig({ - component: { - ...nxComponentTestingPreset(__filename), - }, -}); diff --git a/apps/testing/20-modal/cypress/fixtures/example.json b/apps/testing/20-modal/cypress/fixtures/example.json deleted file mode 100644 index 02e425437..000000000 --- a/apps/testing/20-modal/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/apps/testing/20-modal/cypress/support/commands.ts b/apps/testing/20-modal/cypress/support/commands.ts deleted file mode 100644 index b5d8a9582..000000000 --- a/apps/testing/20-modal/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { mount } from 'cypress/angular'; - -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - mount: typeof mount; - } - } -} - -Cypress.Commands.add('mount', mount); diff --git a/apps/testing/20-modal/cypress/support/component-index.html b/apps/testing/20-modal/cypress/support/component-index.html deleted file mode 100644 index 7af656787..000000000 --- a/apps/testing/20-modal/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - testing-modal Components App - - -
- - diff --git a/apps/testing/20-modal/cypress/support/component.ts b/apps/testing/20-modal/cypress/support/component.ts deleted file mode 100644 index e7c3e3cbc..000000000 --- a/apps/testing/20-modal/cypress/support/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your subscription files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.ts using ES2015 syntax: -import './commands'; diff --git a/apps/testing/20-modal/cypress/tsconfig.json b/apps/testing/20-modal/cypress/tsconfig.json deleted file mode 100644 index 918d96378..000000000 --- a/apps/testing/20-modal/cypress/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["cypress", "node"], - "sourceMap": false - }, - "include": [ - "support/**/*.ts", - "../cypress.config.ts", - "../**/*.cy.ts", - "../**/*.cy.tsx", - "../**/*.cy.js", - "../**/*.cy.jsx", - "../**/*.d.ts" - ] -} diff --git a/apps/testing/20-modal/jest.config.ts b/apps/testing/20-modal/jest.config.ts deleted file mode 100644 index 809080bcc..000000000 --- a/apps/testing/20-modal/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-modal', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/20-modal/project.json b/apps/testing/20-modal/project.json deleted file mode 100644 index 8892cc51c..000000000 --- a/apps/testing/20-modal/project.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "testing-modal", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/testing/20-modal/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/20-modal", - "index": "apps/testing/20-modal/src/index.html", - "main": "apps/testing/20-modal/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/20-modal/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/testing/20-modal/src/favicon.ico", - "apps/testing/20-modal/src/assets" - ], - "styles": [ - "apps/testing/20-modal/src/styles.scss", - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-modal:build:production" - }, - "development": { - "buildTarget": "testing-modal:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-modal:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - }, - "component-test": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/testing/20-modal/cypress.config.ts", - "testingType": "component", - "skipServe": true, - "devServerTarget": "testing-modal:build" - } - } - } -} diff --git a/apps/testing/20-modal/src/app/app.component.cy.ts b/apps/testing/20-modal/src/app/app.component.cy.ts deleted file mode 100644 index 4da98fbd1..000000000 --- a/apps/testing/20-modal/src/app/app.component.cy.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { AppComponent } from './app.component'; - -describe(AppComponent.name, () => { - const setup = () => { - cy.mount(AppComponent); - }; - - test('error modal is displayed if you click on "Confirm" without inputing a name', () => { - setup(); - }); - - test('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', () => { - setup(); - }); - - test('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', () => { - setup(); - }); -}); diff --git a/apps/testing/20-modal/src/app/app.component.spec.ts b/apps/testing/20-modal/src/app/app.component.spec.ts deleted file mode 100644 index d730b6e2b..000000000 --- a/apps/testing/20-modal/src/app/app.component.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { render } from '@testing-library/angular'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - test('error modal is displayed if you click on "Confirm" without inputing a name', async () => { - await render(AppComponent); - }); - - test('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', async () => { - await render(AppComponent); - }); - - test('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', async () => { - await render(AppComponent); - }); -}); diff --git a/apps/testing/20-modal/src/app/app.component.ts b/apps/testing/20-modal/src/app/app.component.ts deleted file mode 100644 index d5f35b4bf..000000000 --- a/apps/testing/20-modal/src/app/app.component.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { Component, inject } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialog, MatDialogModule } from '@angular/material/dialog'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { BehaviorSubject } from 'rxjs'; -import { ErrorDialog } from './error.dialog'; -import { ProfilConfirmationDialog } from './profil-confirmation.dialog'; -@Component({ - imports: [ - ReactiveFormsModule, - MatDialogModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - AsyncPipe, - ], - selector: 'app-root', - host: { - class: 'p-4 block flex gap-4 items-center', - }, - template: ` - - Name - - - - -
{{ result$ | async }}
- `, -}) -export class AppComponent { - private modal = inject(MatDialog); - private result = new BehaviorSubject(''); - result$ = this.result.asObservable(); - - name = new FormControl('', { nonNullable: true }); - - confirm() { - if (!this.name.value) { - this.modal.open(ErrorDialog); - return; - } - - this.modal - .open(ProfilConfirmationDialog, { - data: { - name: this.name.value, - }, - }) - .afterClosed() - .subscribe((result) => - this.result.next( - result ? 'Name has been submitted' : 'Name is invalid !!', - ), - ); - } -} diff --git a/apps/testing/20-modal/src/app/app.config.ts b/apps/testing/20-modal/src/app/app.config.ts deleted file mode 100644 index 87a76cda5..000000000 --- a/apps/testing/20-modal/src/app/app.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; -export const appConfig: ApplicationConfig = { - providers: [provideAnimations()], -}; diff --git a/apps/testing/20-modal/src/app/error.dialog.ts b/apps/testing/20-modal/src/app/error.dialog.ts deleted file mode 100644 index 251d5d513..000000000 --- a/apps/testing/20-modal/src/app/error.dialog.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable @angular-eslint/component-class-suffix */ -import { Component } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialogModule } from '@angular/material/dialog'; - -@Component({ - imports: [MatButtonModule, MatDialogModule], - template: ` -

Error

-
- You must enter a - name - first!! -
-
- -
- `, -}) -export class ErrorDialog {} diff --git a/apps/testing/20-modal/src/app/profil-confirmation.dialog.ts b/apps/testing/20-modal/src/app/profil-confirmation.dialog.ts deleted file mode 100644 index e77211e24..000000000 --- a/apps/testing/20-modal/src/app/profil-confirmation.dialog.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable @angular-eslint/component-class-suffix */ -import { Component, inject } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog'; - -@Component({ - imports: [MatButtonModule, MatDialogModule], - template: ` -

Profil

-
Name: {{ data.name }}
-
- - -
- `, -}) -export class ProfilConfirmationDialog { - data = inject(MAT_DIALOG_DATA); -} diff --git a/apps/testing/20-modal/src/assets/.gitkeep b/apps/testing/20-modal/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/20-modal/src/favicon.ico b/apps/testing/20-modal/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/20-modal/src/favicon.ico and /dev/null differ diff --git a/apps/testing/20-modal/src/index.html b/apps/testing/20-modal/src/index.html deleted file mode 100644 index 362733ce1..000000000 --- a/apps/testing/20-modal/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-modal - - - - - - - - diff --git a/apps/testing/20-modal/src/main.ts b/apps/testing/20-modal/src/main.ts deleted file mode 100644 index 7961924bf..000000000 --- a/apps/testing/20-modal/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/testing/20-modal/src/styles.scss b/apps/testing/20-modal/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/testing/20-modal/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/testing/20-modal/src/test-setup.ts b/apps/testing/20-modal/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/20-modal/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/20-modal/tailwind.config.js b/apps/testing/20-modal/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/testing/20-modal/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/testing/20-modal/tsconfig.app.json b/apps/testing/20-modal/tsconfig.app.json deleted file mode 100644 index 5fdad8685..000000000 --- a/apps/testing/20-modal/tsconfig.app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "cypress/**/*", - "cypress.config.ts", - "**/*.cy.ts", - "**/*.cy.js", - "**/*.cy.tsx", - "**/*.cy.jsx" - ] -} diff --git a/apps/testing/20-modal/tsconfig.editor.json b/apps/testing/20-modal/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/20-modal/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/20-modal/tsconfig.json b/apps/testing/20-modal/tsconfig.json deleted file mode 100644 index 3879b94cd..000000000 --- a/apps/testing/20-modal/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./cypress/tsconfig.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/20-modal/tsconfig.spec.json b/apps/testing/20-modal/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/20-modal/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/23-harness/.eslintrc.json b/apps/testing/23-harness/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/23-harness/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/23-harness/README.md b/apps/testing/23-harness/README.md deleted file mode 100644 index 541da1ac8..000000000 --- a/apps/testing/23-harness/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Harness - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-harness -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/23-harness/). diff --git a/apps/testing/23-harness/jest.config.ts b/apps/testing/23-harness/jest.config.ts deleted file mode 100644 index 2b9e6d44c..000000000 --- a/apps/testing/23-harness/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-harness', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/23-harness/project.json b/apps/testing/23-harness/project.json deleted file mode 100644 index 4da50e6a4..000000000 --- a/apps/testing/23-harness/project.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "testing-harness", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/testing/23-harness/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/23-harness", - "index": "apps/testing/23-harness/src/index.html", - "main": "apps/testing/23-harness/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/23-harness/tsconfig.app.json", - "assets": [ - "apps/testing/23-harness/src/favicon.ico", - "apps/testing/23-harness/src/assets" - ], - "styles": ["apps/testing/23-harness/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-harness:build:production" - }, - "development": { - "buildTarget": "testing-harness:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-harness:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/testing/23-harness/src/app/app.component.ts b/apps/testing/23-harness/src/app/app.component.ts deleted file mode 100644 index 7ecf1998d..000000000 --- a/apps/testing/23-harness/src/app/app.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { ChildComponent } from './child.component'; - -@Component({ - imports: [ChildComponent], - selector: 'app-root', - template: ` - - `, - styles: [''], -}) -export class AppComponent {} diff --git a/apps/testing/23-harness/src/app/app.config.ts b/apps/testing/23-harness/src/app/app.config.ts deleted file mode 100644 index 59198e627..000000000 --- a/apps/testing/23-harness/src/app/app.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; - -export const appConfig: ApplicationConfig = { - providers: [provideAnimations()], -}; diff --git a/apps/testing/23-harness/src/app/child.component.spec.ts b/apps/testing/23-harness/src/app/child.component.spec.ts deleted file mode 100644 index 1c4b236c8..000000000 --- a/apps/testing/23-harness/src/app/child.component.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { render } from '@testing-library/angular'; -import { ChildComponent } from './child.component'; - -describe('ChildComponent', () => { - describe('When init', () => { - test('Then show 1 slider, 3 checkboxes, 4 inputs, 2 buttons', async () => { - await render(ChildComponent); - }); - - test('Then initial value of slider thumb is 0', async () => { - await render(ChildComponent); - }); - }); - - describe('Given maxValue set to 109', () => { - test('Then slider max value is 109', async () => { - await render(ChildComponent); - }); - }); - - describe('When disabled checkbox is toggled', () => { - test('Then slider is disabled', async () => { - await render(ChildComponent); - }); - }); - - describe('Given step value set to 5, and When clicking on forward button two times', () => { - test('Then thumb value is 10', async () => { - await render(ChildComponent); - }); - }); - - describe('Given slider value set to 5, and step value to 6 and When clicking on back button', () => { - test('Then slider value is still 5', async () => { - await render(ChildComponent); - }); - }); -}); diff --git a/apps/testing/23-harness/src/app/child.component.ts b/apps/testing/23-harness/src/app/child.component.ts deleted file mode 100644 index 935f08f89..000000000 --- a/apps/testing/23-harness/src/app/child.component.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Component } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSliderModule } from '@angular/material/slider'; - -@Component({ - selector: 'app-child', - template: ` - - -

Slider configuration

- -
- - Value - - - - Min value - - - - Max value - - - - Step size - - -
- -
- Show ticks -
- -
- Show thumb label -
- -
- Disabled -
-
-
- - - -
- - - - - -
-
-
- `, - styles: [ - ` - .mat-mdc-slider { - max-width: 300px; - width: 100%; - } - - .mat-mdc-card + .mat-mdc-card { - margin-top: 8px; - } - `, - ], - imports: [ - MatCardModule, - MatFormFieldModule, - MatInputModule, - FormsModule, - MatCheckboxModule, - MatSliderModule, - MatIconModule, - ], -}) -export class ChildComponent { - disabled = false; - max = 100; - min = 0; - showTicks = false; - step = 1; - thumbLabel = false; - value = 0; - - back() { - if (this.value - this.step >= this.min) { - this.value -= this.step; - } - } - - forward() { - if (this.value + this.step <= this.max) { - this.value += this.step; - } - } -} diff --git a/apps/testing/23-harness/src/assets/.gitkeep b/apps/testing/23-harness/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/23-harness/src/favicon.ico b/apps/testing/23-harness/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/23-harness/src/favicon.ico and /dev/null differ diff --git a/apps/testing/23-harness/src/index.html b/apps/testing/23-harness/src/index.html deleted file mode 100644 index 9b55da74f..000000000 --- a/apps/testing/23-harness/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - testing-harness - - - - - - - - - diff --git a/apps/testing/23-harness/src/main.ts b/apps/testing/23-harness/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/testing/23-harness/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/testing/23-harness/src/styles.scss b/apps/testing/23-harness/src/styles.scss deleted file mode 100644 index 9a29b71e6..000000000 --- a/apps/testing/23-harness/src/styles.scss +++ /dev/null @@ -1,29 +0,0 @@ -@use '@angular/material' as mat; - -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ - -@include mat.elevation-classes(); -@include mat.app-background(); - -$theme-primary: mat.m2-define-palette(mat.$m2-indigo-palette); -$theme-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400); - -$theme-warn: mat.m2-define-palette(mat.$m2-red-palette); - -$theme: mat.m2-define-light-theme( - ( - color: ( - primary: $theme-primary, - accent: $theme-accent, - warn: $theme-warn, - ), - typography: mat.m2-define-typography-config(), - ) -); - -@include mat.dialog-theme($theme); -@include mat.all-component-themes($theme); diff --git a/apps/testing/23-harness/src/test-setup.ts b/apps/testing/23-harness/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/23-harness/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/23-harness/tailwind.config.js b/apps/testing/23-harness/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/testing/23-harness/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/testing/23-harness/tsconfig.app.json b/apps/testing/23-harness/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/testing/23-harness/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/testing/23-harness/tsconfig.editor.json b/apps/testing/23-harness/tsconfig.editor.json deleted file mode 100644 index 67634012e..000000000 --- a/apps/testing/23-harness/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts", "jest.config.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/testing/23-harness/tsconfig.json b/apps/testing/23-harness/tsconfig.json deleted file mode 100644 index 4e4cd748d..000000000 --- a/apps/testing/23-harness/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/23-harness/tsconfig.spec.json b/apps/testing/23-harness/tsconfig.spec.json deleted file mode 100644 index 758c12092..000000000 --- a/apps/testing/23-harness/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "target": "es2016", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/24-harness-creation/.eslintrc.json b/apps/testing/24-harness-creation/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/24-harness-creation/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/24-harness-creation/README.md b/apps/testing/24-harness-creation/README.md deleted file mode 100644 index 928bb1aab..000000000 --- a/apps/testing/24-harness-creation/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Harness Creation - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-harness-creation -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/24-harness-creation/). diff --git a/apps/testing/24-harness-creation/jest.config.ts b/apps/testing/24-harness-creation/jest.config.ts deleted file mode 100644 index c4b9f08db..000000000 --- a/apps/testing/24-harness-creation/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-harness-creation', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/24-harness-creation/project.json b/apps/testing/24-harness-creation/project.json deleted file mode 100644 index 60b0ddb8b..000000000 --- a/apps/testing/24-harness-creation/project.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "testing-harness-creation", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/testing/24-harness-creation/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/24-harness-creation", - "index": "apps/testing/24-harness-creation/src/index.html", - "main": "apps/testing/24-harness-creation/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/24-harness-creation/tsconfig.app.json", - "assets": [ - "apps/testing/24-harness-creation/src/favicon.ico", - "apps/testing/24-harness-creation/src/assets" - ], - "styles": ["apps/testing/24-harness-creation/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-harness-creation:build:production" - }, - "development": { - "buildTarget": "testing-harness-creation:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-harness-creation:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/testing/24-harness-creation/src/app/app.component.spec.ts b/apps/testing/24-harness-creation/src/app/app.component.spec.ts deleted file mode 100644 index c8d9f4ba7..000000000 --- a/apps/testing/24-harness-creation/src/app/app.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { render } from '@testing-library/angular'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - describe('When clicking 2 times on plus button of first slider', () => { - test('Then value is 16', async () => { - await render(AppComponent); - }); - }); - - describe('When clicking 1 time on plus button and two times on minus button of first slider', () => { - test('Then value is still 10', async () => { - await render(AppComponent); - }); - }); - - describe('When clicking 4 times on plus button of slider 1', () => { - test('Then slider 2 is enabled', async () => { - await render(AppComponent); - }); - }); -}); diff --git a/apps/testing/24-harness-creation/src/app/app.component.ts b/apps/testing/24-harness-creation/src/app/app.component.ts deleted file mode 100644 index b1c16240e..000000000 --- a/apps/testing/24-harness-creation/src/app/app.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, signal } from '@angular/core'; -import { SliderComponent } from './slider.component'; - -@Component({ - imports: [SliderComponent], - selector: 'app-root', - template: ` -

Slider 1: {{ slider1Value() }}

- -

Slider 2: {{ slider2Value() }}

-

Enabled only if Slider 1 > 20

- - `, - styles: [''], -}) -export class AppComponent { - slider1Value = signal(10); - slider2Value = signal(0); -} diff --git a/apps/testing/24-harness-creation/src/app/app.config.ts b/apps/testing/24-harness-creation/src/app/app.config.ts deleted file mode 100644 index 59198e627..000000000 --- a/apps/testing/24-harness-creation/src/app/app.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; - -export const appConfig: ApplicationConfig = { - providers: [provideAnimations()], -}; diff --git a/apps/testing/24-harness-creation/src/app/slider.component.ts b/apps/testing/24-harness-creation/src/app/slider.component.ts deleted file mode 100644 index 28615728f..000000000 --- a/apps/testing/24-harness-creation/src/app/slider.component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Component, input, OnInit, output, signal } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatIconModule } from '@angular/material/icon'; -import { MatSliderModule } from '@angular/material/slider'; - -@Component({ - selector: 'app-slider', - template: ` - - -
- - {{ minValue() }} - - - - {{ maxValue() }} - -
-
-
- `, - styles: [ - ` - .mat-mdc-slider { - max-width: 300px; - width: 100%; - } - - .mat-mdc-card { - margin-top: 8px; - flex-direction: row; - } - `, - ], - imports: [MatCardModule, MatSliderModule, MatIconModule, FormsModule], -}) -export class SliderComponent implements OnInit { - step = input(1); - minValue = input(0); - maxValue = input(100); - disabled = input(false); - - value = signal(0); - valueChange = output(); - - ngOnInit(): void { - this.value.set(this.minValue()); - } - - back() { - if (this.value() - this.step() >= this.minValue()) { - this.value.update((v) => v - this.step()); - } - } - - forward() { - if (this.value() + this.step() <= this.maxValue()) { - this.value.update((v) => v + this.step()); - } - } -} diff --git a/apps/testing/24-harness-creation/src/app/slider.harness.ts b/apps/testing/24-harness-creation/src/app/slider.harness.ts deleted file mode 100644 index a2ab6c0df..000000000 --- a/apps/testing/24-harness-creation/src/app/slider.harness.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ComponentHarness } from '@angular/cdk/testing'; - -export class MySliderHarness extends ComponentHarness { - static hostSelector = 'app-slider'; -} diff --git a/apps/testing/24-harness-creation/src/assets/.gitkeep b/apps/testing/24-harness-creation/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/24-harness-creation/src/favicon.ico b/apps/testing/24-harness-creation/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/24-harness-creation/src/favicon.ico and /dev/null differ diff --git a/apps/testing/24-harness-creation/src/index.html b/apps/testing/24-harness-creation/src/index.html deleted file mode 100644 index c66440e5c..000000000 --- a/apps/testing/24-harness-creation/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - testing-harness-creation - - - - - - - - - diff --git a/apps/testing/24-harness-creation/src/main.ts b/apps/testing/24-harness-creation/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/testing/24-harness-creation/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/testing/24-harness-creation/src/styles.scss b/apps/testing/24-harness-creation/src/styles.scss deleted file mode 100644 index 1430d2f9b..000000000 --- a/apps/testing/24-harness-creation/src/styles.scss +++ /dev/null @@ -1,30 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -@use '@angular/material' as mat; - -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ - -@include mat.elevation-classes(); -@include mat.app-background(); - -$theme-primary: mat.m2-define-palette(mat.$m2-indigo-palette); -$theme-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400); - -$theme-warn: mat.m2-define-palette(mat.$m2-red-palette); - -$theme: mat.m2-define-light-theme( - ( - color: ( - primary: $theme-primary, - accent: $theme-accent, - warn: $theme-warn, - ), - typography: mat.m2-define-typography-config(), - ) -); - -@include mat.dialog-theme($theme); -@include mat.all-component-themes($theme); diff --git a/apps/testing/24-harness-creation/src/test-setup.ts b/apps/testing/24-harness-creation/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/24-harness-creation/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/24-harness-creation/tailwind.config.js b/apps/testing/24-harness-creation/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/testing/24-harness-creation/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/testing/24-harness-creation/tsconfig.app.json b/apps/testing/24-harness-creation/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/testing/24-harness-creation/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/testing/24-harness-creation/tsconfig.editor.json b/apps/testing/24-harness-creation/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/testing/24-harness-creation/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/testing/24-harness-creation/tsconfig.json b/apps/testing/24-harness-creation/tsconfig.json deleted file mode 100644 index 4e4cd748d..000000000 --- a/apps/testing/24-harness-creation/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/24-harness-creation/tsconfig.spec.json b/apps/testing/24-harness-creation/tsconfig.spec.json deleted file mode 100644 index 758c12092..000000000 --- a/apps/testing/24-harness-creation/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "target": "es2016", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/28-checkbox/.eslintrc.json b/apps/testing/28-checkbox/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/28-checkbox/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/28-checkbox/README.md b/apps/testing/28-checkbox/README.md deleted file mode 100644 index 905db5f52..000000000 --- a/apps/testing/28-checkbox/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Checkbox - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-checkbox -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/28-checkbox/). diff --git a/apps/testing/28-checkbox/jest.config.ts b/apps/testing/28-checkbox/jest.config.ts deleted file mode 100644 index c27a02c1e..000000000 --- a/apps/testing/28-checkbox/jest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-checkbox', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../../coverage/apps/testing/28-checkbox', - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/28-checkbox/project.json b/apps/testing/28-checkbox/project.json deleted file mode 100644 index 2ef8a3cc1..000000000 --- a/apps/testing/28-checkbox/project.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "testing-checkbox", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/testing/28-checkbox/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/28-checkbox", - "index": "apps/testing/28-checkbox/src/index.html", - "main": "apps/testing/28-checkbox/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/28-checkbox/tsconfig.app.json", - "assets": [ - "apps/testing/28-checkbox/src/favicon.ico", - "apps/testing/28-checkbox/src/assets" - ], - "styles": ["apps/testing/28-checkbox/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-checkbox:build:production" - }, - "development": { - "buildTarget": "testing-checkbox:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-checkbox:build" - } - }, - "test": { - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - } - } -} diff --git a/apps/testing/28-checkbox/src/app/app.component.spec.ts b/apps/testing/28-checkbox/src/app/app.component.spec.ts deleted file mode 100644 index bb64b9283..000000000 --- a/apps/testing/28-checkbox/src/app/app.component.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { render } from '@testing-library/angular'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - describe('When checking the checkbox', () => { - it('Then button is enabled', async () => { - await render(AppComponent); - }); - }); -}); diff --git a/apps/testing/28-checkbox/src/app/app.component.ts b/apps/testing/28-checkbox/src/app/app.component.ts deleted file mode 100644 index d23f1700b..000000000 --- a/apps/testing/28-checkbox/src/app/app.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - template: ` - - - - `, -}) -export class AppComponent { - check = false; - - toggleCheck() { - this.check = !this.check; - } -} diff --git a/apps/testing/28-checkbox/src/assets/.gitkeep b/apps/testing/28-checkbox/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/28-checkbox/src/favicon.ico b/apps/testing/28-checkbox/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/28-checkbox/src/favicon.ico and /dev/null differ diff --git a/apps/testing/28-checkbox/src/index.html b/apps/testing/28-checkbox/src/index.html deleted file mode 100644 index 75e95fe9f..000000000 --- a/apps/testing/28-checkbox/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-checkbox - - - - - - - - diff --git a/apps/testing/28-checkbox/src/main.ts b/apps/testing/28-checkbox/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/testing/28-checkbox/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/testing/28-checkbox/src/styles.scss b/apps/testing/28-checkbox/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/testing/28-checkbox/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/testing/28-checkbox/src/test-setup.ts b/apps/testing/28-checkbox/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/28-checkbox/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/28-checkbox/tailwind.config.js b/apps/testing/28-checkbox/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/testing/28-checkbox/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/testing/28-checkbox/tsconfig.app.json b/apps/testing/28-checkbox/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/testing/28-checkbox/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/testing/28-checkbox/tsconfig.editor.json b/apps/testing/28-checkbox/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/28-checkbox/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/28-checkbox/tsconfig.json b/apps/testing/28-checkbox/tsconfig.json deleted file mode 100644 index e85865cf5..000000000 --- a/apps/testing/28-checkbox/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/28-checkbox/tsconfig.spec.json b/apps/testing/28-checkbox/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/28-checkbox/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/testing/29-real-life-application/.eslintrc.json b/apps/testing/29-real-life-application/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/testing/29-real-life-application/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/testing/29-real-life-application/README.md b/apps/testing/29-real-life-application/README.md deleted file mode 100644 index 8dcfe21e6..000000000 --- a/apps/testing/29-real-life-application/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Real-life Application - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve testing-real-life-application -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/testing/29-real-application/). diff --git a/apps/testing/29-real-life-application/cypress.config.ts b/apps/testing/29-real-life-application/cypress.config.ts deleted file mode 100644 index 3738464ee..000000000 --- a/apps/testing/29-real-life-application/cypress.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; -import { defineConfig } from 'cypress'; - -export default defineConfig({ - component: { - ...nxComponentTestingPreset(__filename), - }, -}); diff --git a/apps/testing/29-real-life-application/cypress/fixtures/example.json b/apps/testing/29-real-life-application/cypress/fixtures/example.json deleted file mode 100644 index 02e425437..000000000 --- a/apps/testing/29-real-life-application/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/apps/testing/29-real-life-application/cypress/support/commands.ts b/apps/testing/29-real-life-application/cypress/support/commands.ts deleted file mode 100644 index b5d8a9582..000000000 --- a/apps/testing/29-real-life-application/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { mount } from 'cypress/angular'; - -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - mount: typeof mount; - } - } -} - -Cypress.Commands.add('mount', mount); diff --git a/apps/testing/29-real-life-application/cypress/support/component-index.html b/apps/testing/29-real-life-application/cypress/support/component-index.html deleted file mode 100644 index 2315c8b59..000000000 --- a/apps/testing/29-real-life-application/cypress/support/component-index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - testing-real-life-application Components App - - -
- - diff --git a/apps/testing/29-real-life-application/cypress/support/component.ts b/apps/testing/29-real-life-application/cypress/support/component.ts deleted file mode 100644 index e7c3e3cbc..000000000 --- a/apps/testing/29-real-life-application/cypress/support/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your subscription files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.ts using ES2015 syntax: -import './commands'; diff --git a/apps/testing/29-real-life-application/cypress/tsconfig.json b/apps/testing/29-real-life-application/cypress/tsconfig.json deleted file mode 100644 index 918d96378..000000000 --- a/apps/testing/29-real-life-application/cypress/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["cypress", "node"], - "sourceMap": false - }, - "include": [ - "support/**/*.ts", - "../cypress.config.ts", - "../**/*.cy.ts", - "../**/*.cy.tsx", - "../**/*.cy.js", - "../**/*.cy.jsx", - "../**/*.d.ts" - ] -} diff --git a/apps/testing/29-real-life-application/jest.config.ts b/apps/testing/29-real-life-application/jest.config.ts deleted file mode 100644 index b78a06561..000000000 --- a/apps/testing/29-real-life-application/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'testing-real-life-application', - preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - transform: { - '^.+\\.(ts|mjs|js|html)$': [ - 'jest-preset-angular', - { - tsconfig: '/tsconfig.spec.json', - stringifyContentPathRegex: '\\.(html|svg)$', - }, - ], - }, - transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], - snapshotSerializers: [ - 'jest-preset-angular/build/serializers/no-ng-attributes', - 'jest-preset-angular/build/serializers/ng-snapshot', - 'jest-preset-angular/build/serializers/html-comment', - ], -}; diff --git a/apps/testing/29-real-life-application/project.json b/apps/testing/29-real-life-application/project.json deleted file mode 100644 index 25833bf4c..000000000 --- a/apps/testing/29-real-life-application/project.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "testing-real-life-application", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/testing/29-real-life-application/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/testing/29-real-life-application", - "index": "apps/testing/29-real-life-application/src/index.html", - "main": "apps/testing/29-real-life-application/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/testing/29-real-life-application/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/testing/29-real-life-application/src/favicon.ico", - "apps/testing/29-real-life-application/src/assets" - ], - "styles": [ - "apps/testing/29-real-life-application/src/styles.scss", - "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "testing-real-life-application:build:production" - }, - "development": { - "buildTarget": "testing-real-life-application:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "testing-real-life-application:build" - } - }, - "test": { - "outputs": [ - "{workspaceRoot}/coverage/{projectRoot}", - "{projectRoot}/coverage" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "coverage": true - } - } - }, - "component-test": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/testing/29-real-life-application/cypress.config.ts", - "testingType": "component", - "skipServe": true, - "devServerTarget": "testing-real-life-application:build" - } - } - } -} diff --git a/apps/testing/29-real-life-application/src/app/app.component.ts b/apps/testing/29-real-life-application/src/app/app.component.ts deleted file mode 100644 index a4b00aaec..000000000 --- a/apps/testing/29-real-life-application/src/app/app.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; - -@Component({ - selector: 'app-root', - imports: [RouterOutlet], - template: ` - - `, -}) -export class AppComponent {} diff --git a/apps/testing/29-real-life-application/src/app/app.config.ts b/apps/testing/29-real-life-application/src/app/app.config.ts deleted file mode 100644 index 2812399d0..000000000 --- a/apps/testing/29-real-life-application/src/app/app.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideAnimations } from '@angular/platform-browser/animations'; -import { provideRouter } from '@angular/router'; -import { APP_ROUTES } from './app.route'; -export const appConfig: ApplicationConfig = { - providers: [provideAnimations(), provideRouter(APP_ROUTES)], -}; diff --git a/apps/testing/29-real-life-application/src/app/app.route.ts b/apps/testing/29-real-life-application/src/app/app.route.ts deleted file mode 100644 index f9104ef8e..000000000 --- a/apps/testing/29-real-life-application/src/app/app.route.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Routes } from '@angular/router'; - -export const PARAM_TICKET_ID = 'ticketId'; - -export const APP_ROUTES: Routes = [ - { - path: '', - pathMatch: 'full', - redirectTo: 'list', - }, - { - path: 'list', - loadComponent: () => - import('./list/list.component').then((m) => m.ListComponent), - }, - { - path: `detail/:${PARAM_TICKET_ID}`, - loadComponent: () => - import('./detail/detail.component').then((m) => m.DetailComponent), - }, - { - path: '**', - redirectTo: 'list', - }, -]; diff --git a/apps/testing/29-real-life-application/src/app/backend.service.ts b/apps/testing/29-real-life-application/src/app/backend.service.ts deleted file mode 100644 index 08929eda4..000000000 --- a/apps/testing/29-real-life-application/src/app/backend.service.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable, delay, of, throwError } from 'rxjs'; - -export type User = { - id: number; - name: string; -}; - -export interface BaseTicket { - id: number; - description: string; - completed: boolean; -} - -export interface Ticket extends BaseTicket { - assigneeId: number | null; -} - -export interface TicketUser extends BaseTicket { - assignee: string; -} - -function randomDelay() { - return Math.random() * 1000; -} - -@Injectable({ providedIn: 'root' }) -export class BackendService { - storedTickets: Ticket[] = [ - { - id: 0, - description: 'Install a monitor arm', - assigneeId: 111, - completed: false, - }, - { - id: 1, - description: 'Move the desk to the new location', - assigneeId: 111, - completed: false, - }, - ]; - - storedUsers: User[] = [ - { id: 111, name: 'Thomas' }, - { id: 222, name: 'Jack' }, - ]; - - lastId = 1; - - private findTicketById = (id: number) => - this.storedTickets.find((ticket) => ticket.id === +id); - - private findUserById = (id: number) => - this.storedUsers.find((user) => user.id === +id); - - tickets() { - return of(this.storedTickets).pipe(delay(randomDelay())); - } - - ticket(id: number): Observable { - return of(this.findTicketById(id)).pipe(delay(randomDelay())); - } - - users() { - return of(this.storedUsers).pipe(delay(randomDelay())); - } - - user(id: number) { - return of(this.findUserById(id)).pipe(delay(randomDelay())); - } - - newTicket(payload: { description: string }) { - const newTicket: Ticket = { - id: ++this.lastId, - description: payload.description, - assigneeId: null, - completed: false, - }; - - this.storedTickets = this.storedTickets.concat(newTicket); - - return of(newTicket).pipe(delay(randomDelay())); - } - - assign(ticketId: number, userId: number) { - return this.update(ticketId, { assigneeId: userId }); - } - - complete(ticketId: number, completed: boolean) { - return this.update(ticketId, { completed }); - } - - update(ticketId: number, updates: Partial>) { - const foundTicket = this.findTicketById(ticketId); - - if (!foundTicket) { - return throwError(() => new Error('ticket not found')); - } - - const updatedTicket = { ...foundTicket, ...updates }; - - this.storedTickets = this.storedTickets.map((t) => - t.id === ticketId ? updatedTicket : t, - ); - - return of(updatedTicket).pipe(delay(randomDelay())); - } -} diff --git a/apps/testing/29-real-life-application/src/app/detail/detail.component.ts b/apps/testing/29-real-life-application/src/app/detail/detail.component.ts deleted file mode 100644 index 0f88f0bf2..000000000 --- a/apps/testing/29-real-life-application/src/app/detail/detail.component.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { Component, inject } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { RouterLink } from '@angular/router'; -import { provideComponentStore } from '@ngrx/component-store'; -import { DetailStore } from './detail.store'; - -@Component({ - selector: 'app-detail', - imports: [MatButtonModule, RouterLink, MatProgressBarModule, AsyncPipe], - template: ` -

Ticket Detail:

- @if (vm$ | async; as vm) { - @if (vm.loading) { - - } - @if (vm.ticket) { -
-
- Ticket: - {{ vm.ticket.id }} -
-
- Description: - {{ vm.ticket.description }} -
-
- AssigneeId: - {{ vm.ticket.assigneeId }} -
-
- Is done: - {{ vm.ticket.completed }} -
-
- } - } - - - `, - providers: [provideComponentStore(DetailStore)], - host: { - class: 'p-5 block', - }, -}) -export class DetailComponent { - vm$ = inject(DetailStore).vm$; -} diff --git a/apps/testing/29-real-life-application/src/app/detail/detail.store.ts b/apps/testing/29-real-life-application/src/app/detail/detail.store.ts deleted file mode 100644 index a5cf12eff..000000000 --- a/apps/testing/29-real-life-application/src/app/detail/detail.store.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { inject, Injectable } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { ComponentStore, OnStateInit } from '@ngrx/component-store'; -import { concatLatestFrom, tapResponse } from '@ngrx/operators'; -import { pipe } from 'rxjs'; -import { map, mergeMap, tap } from 'rxjs/operators'; -import { PARAM_TICKET_ID } from '../app.route'; -import { BackendService, Ticket } from '../backend.service'; - -export interface TicketState { - ticket?: Ticket; - loading: boolean; - error: unknown; -} - -const initialState: TicketState = { - loading: false, - error: '', -}; - -@Injectable() -export class DetailStore - extends ComponentStore - implements OnStateInit -{ - private readonly backend = inject(BackendService); - private readonly route = inject(ActivatedRoute); - - readonly ticket$ = this.select((state) => state.ticket); - readonly loading$ = this.select((state) => state.loading); - readonly error$ = this.select((state) => state.error); - - readonly vm$ = this.select({ - ticket: this.ticket$, - loading: this.loading$, - }); - - constructor() { - super(initialState); - } - - readonly loadTicket = this.effect( - pipe( - concatLatestFrom(() => - this.route.params.pipe(map((p) => p[PARAM_TICKET_ID])), - ), - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap(([, id]) => - this.backend.ticket(id).pipe( - tapResponse( - (ticket) => - this.patchState({ - loading: false, - ticket, - }), - (error: unknown) => this.patchState({ error }), - ), - ), - ), - ), - ); - - ngrxOnStateInit() { - this.loadTicket(); - } -} diff --git a/apps/testing/29-real-life-application/src/app/list/list.component.spec.ts b/apps/testing/29-real-life-application/src/app/list/list.component.spec.ts deleted file mode 100644 index a03aca868..000000000 --- a/apps/testing/29-real-life-application/src/app/list/list.component.spec.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ReactiveFormsModule } from '@angular/forms'; -import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { RouterTestingModule } from '@angular/router/testing'; -import { of } from 'rxjs'; -import { BackendService } from '../backend.service'; -import { ListComponent } from './list.component'; - -const USERS = [ - { id: 1, name: 'titi' }, - { id: 2, name: 'george' }, -]; -const TICKETS = [ - { - id: 0, - description: 'Install a monitor arm', - assigneeId: 1, - completed: false, - }, - { - id: 1, - description: 'Coucou', - assigneeId: 1, - completed: false, - }, -]; - -describe('ListComponent', () => { - let component: ListComponent; - let fixture: ComponentFixture; - - //To change with a setup function - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ - ListComponent, - ReactiveFormsModule, - RouterTestingModule, - NoopAnimationsModule, - ], - providers: [ - { - provide: BackendService, - useValue: { - users: () => of(USERS), - tickets: () => of(TICKETS), - }, - }, - ], - }).compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(ListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - describe('Given Install inside the search input', () => { - it('Then one row is visible', async () => { - // - }); - }); - - describe('When typing a description and clicking on add a new ticket', () => { - describe('Given a success answer from API', () => { - it('Then ticket with the description is added to the list with unassigned status', async () => { - // - }); - }); - - describe('Given a failure answer from API', () => { - it('Then an error is displayed at the bottom of the list', async () => { - // - }); - }); - }); - - describe('When assigning first ticket to george', () => { - describe('Given a success answer from API', () => { - it('Then first ticket is assigned to George', async () => { - // - }); - }); - - describe('Given a failure answer from API', () => { - it('Then an error is displayed at the bottom of the list', async () => { - // - }); - }); - }); - - describe('When finishing first ticket', () => { - describe('Given a success answer from API', () => { - it('Then first ticket is done', async () => { - // - }); - }); - - describe('Given a failure answer from API', () => { - it('Then an error is displayed at the bottom of the list', async () => { - // - }); - }); - }); - - describe('When clicking on first ticket', () => { - it('Then we navigate to detail/0', async () => { - // - }); - }); -}); diff --git a/apps/testing/29-real-life-application/src/app/list/list.component.ts b/apps/testing/29-real-life-application/src/app/list/list.component.ts deleted file mode 100644 index 4c9957139..000000000 --- a/apps/testing/29-real-life-application/src/app/list/list.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { AsyncPipe } from '@angular/common'; -import { Component, inject, OnInit } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { provideComponentStore } from '@ngrx/component-store'; -import { TicketStore } from './ticket.store'; -import { AddComponent } from './ui/add.component'; -import { RowComponent } from './ui/row.component'; - -@Component({ - selector: 'app-list', - imports: [ - ReactiveFormsModule, - AddComponent, - RowComponent, - MatFormFieldModule, - MatProgressBarModule, - MatInputModule, - AsyncPipe, - ], - template: ` -

Tickets

- - - Search - - - - @if (vm$ | async; as vm) { - - - @if (vm.loading) { - - } -
    - @for (ticket of vm.tickets; track ticket.id) { - - } -
-
- {{ vm.error }} -
- } - `, - providers: [provideComponentStore(TicketStore)], - host: { - class: 'p-5 block', - }, -}) -export class ListComponent implements OnInit { - ticketStore = inject(TicketStore); - readonly vm$ = this.ticketStore.vm$; - - search = new FormControl(); - - ngOnInit(): void { - this.ticketStore.search(this.search.valueChanges); - } -} diff --git a/apps/testing/29-real-life-application/src/app/list/ticket.store.spec.ts b/apps/testing/29-real-life-application/src/app/list/ticket.store.spec.ts deleted file mode 100644 index 7155bb0d8..000000000 --- a/apps/testing/29-real-life-application/src/app/list/ticket.store.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -describe('TicketStore', () => { - describe('When init', () => { - it('Then calls backend.users', async () => { - // - }); - - it('Then calls backend.tickets', async () => { - // - }); - - describe('Given all api returns success response', () => { - it('Then tickets and users should be merged ', async () => { - // - }); - }); - - describe('Given users api returns failure response', () => { - it('Then tickets should not have any assignee', () => { - // - }); - }); - - describe('When adding a new ticket with success', () => { - it('Then ticket is added to the list', async () => { - // - }); - }); - }); -}); diff --git a/apps/testing/29-real-life-application/src/app/list/ticket.store.ts b/apps/testing/29-real-life-application/src/app/list/ticket.store.ts deleted file mode 100644 index 838b6038d..000000000 --- a/apps/testing/29-real-life-application/src/app/list/ticket.store.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { Injectable, inject } from '@angular/core'; -import { - ComponentStore, - OnStateInit, - OnStoreInit, -} from '@ngrx/component-store'; -import { tapResponse } from '@ngrx/operators'; -import { pipe } from 'rxjs'; -import { mergeMap, tap } from 'rxjs/operators'; -import { BackendService, Ticket, User } from '../backend.service'; - -export interface TicketState { - tickets: Ticket[]; - search: string; - users: User[]; - loading: boolean; - error: unknown; -} - -const initialState: TicketState = { - tickets: [], - search: '', - users: [], - loading: false, - error: '', -}; - -@Injectable() -export class TicketStore - extends ComponentStore - implements OnStoreInit, OnStateInit -{ - readonly users$ = this.select((state) => state.users); - readonly error$ = this.select((state) => state.error); - readonly loading$ = this.select((state) => state.loading); - private readonly ticketsInput$ = this.select((state) => state.tickets); - private readonly search$ = this.select((state) => state.search); - - private readonly ticketsUsers$ = this.select( - this.users$, - this.ticketsInput$, - (users, tickets) => - users && users.length > 0 - ? tickets.map((ticket) => ({ - ...ticket, - assignee: - users.find((user) => user.id === ticket.assigneeId)?.name ?? - 'unassigned', - })) - : tickets, - ); - - readonly tickets$ = this.select( - this.ticketsUsers$, - this.search$, - (tickets, search) => - tickets.filter((t) => - t.description.toLowerCase().includes(search.toLowerCase()), - ), - ); - - readonly vm$ = this.select( - { - tickets: this.tickets$, - users: this.users$, - loading: this.loading$, - error: this.error$, - }, - { debounce: true }, - ); - - readonly updateAssignee = this.updater((state, ticket: Ticket) => { - const newTickets = [...state.tickets]; - const index = newTickets.findIndex((t) => t.id === ticket.id); - newTickets[index] = ticket; - return { - ...state, - loading: false, - tickets: newTickets, - }; - }); - - readonly search = this.updater((state, search: string) => ({ - ...state, - search, - })); - - private backend = inject(BackendService); - - ngrxOnStoreInit() { - this.setState(initialState); - } - - ngrxOnStateInit() { - this.loadTickets(); - this.loadUsers(); - } - - readonly loadTickets = this.effect( - pipe( - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap(() => - this.backend.tickets().pipe( - tapResponse( - (tickets) => - this.patchState({ - loading: false, - tickets, - }), - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); - - readonly loadUsers = this.effect( - pipe( - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap(() => - this.backend.users().pipe( - tapResponse( - (users) => - this.patchState({ - loading: false, - users, - }), - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); - - readonly addTicket = this.effect( - pipe( - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap((description) => - this.backend.newTicket({ description }).pipe( - tapResponse( - (newTicket) => - this.patchState((state: TicketState) => ({ - loading: false, - tickets: [...state.tickets, newTicket], - })), - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); - - readonly assignTicket = this.effect<{ userId: number; ticketId: number }>( - pipe( - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap((info) => - this.backend.assign(info.ticketId, Number(info.userId)).pipe( - tapResponse( - (newTicket) => this.updateAssignee(newTicket), - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); - - readonly done = this.effect( - pipe( - tap(() => this.patchState({ loading: true, error: '' })), - mergeMap((ticketId) => - this.backend.complete(ticketId, true).pipe( - tapResponse( - (newTicket) => this.updateAssignee(newTicket), - (error: unknown) => this.patchState({ error, loading: false }), - ), - ), - ), - ), - ); -} diff --git a/apps/testing/29-real-life-application/src/app/list/ui/add.component.ts b/apps/testing/29-real-life-application/src/app/list/ui/add.component.ts deleted file mode 100644 index c66fb6d01..000000000 --- a/apps/testing/29-real-life-application/src/app/list/ui/add.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, input, output } from '@angular/core'; -import { - FormControl, - FormGroup, - ReactiveFormsModule, - Validators, -} from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; - -@Component({ - selector: 'app-add', - imports: [ - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - ], - template: ` -
- - Description - - @if (form.controls.description.hasError('required')) { - - Description is - required - - } - - -
- `, -}) -export class AddComponent { - loading = input(false); - - addTicket = output(); - - form = new FormGroup({ - description: new FormControl(null, Validators.required), - }); - - submit() { - if (this.form.valid) { - this.addTicket.emit(this.form.value.description ?? ''); - } - } -} diff --git a/apps/testing/29-real-life-application/src/app/list/ui/row.component.spec.ts b/apps/testing/29-real-life-application/src/app/list/ui/row.component.spec.ts deleted file mode 100644 index 6d9ce0fc3..000000000 --- a/apps/testing/29-real-life-application/src/app/list/ui/row.component.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -const USERS = [ - { id: 1, name: 'titi' }, - { id: 2, name: 'George' }, -]; -const TICKET_NOT_ASSIGNED = { - id: 0, - description: 'Install a monitor arm', - assignee: 'unassigned', - completed: false, -}; - -const TICKET_ASSIGNED = { - id: 1, - description: 'Install a monitor arm', - assignee: 'titi', - completed: false, -}; - -describe('RowComponent', () => { - describe('Given an unassigned ticket', () => { - describe('When we assign it to titi', () => { - it('Then assign event is emitted with ticketId 0 and userId 1', async () => { - // - }); - }); - }); - - describe('Given an assigned ticket', () => { - describe('When we click the done button', () => { - it('Then closeTicket event is emitted with ticketId 1 ', async () => { - // - }); - }); - }); - - describe('When clicking on ticket', () => { - it('Then navigation should be triggered with url detail/0', async () => { - // - }); - }); -}); diff --git a/apps/testing/29-real-life-application/src/app/list/ui/row.component.ts b/apps/testing/29-real-life-application/src/app/list/ui/row.component.ts deleted file mode 100644 index 5d80ea48c..000000000 --- a/apps/testing/29-real-life-application/src/app/list/ui/row.component.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Component, input, output } from '@angular/core'; -import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; -import { RouterLink } from '@angular/router'; -import { Ticket, TicketUser, User } from '../../backend.service'; - -@Component({ - selector: 'app-row', - imports: [ - RouterLink, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - MatSelectModule, - ], - template: ` -
  • - -
    -
    - - Assign to - - @for (user of users(); track user.id) { - - {{ user.name }} - - } - - - -
    - -
    -
  • - `, - host: { - class: 'p-4 border border-blue-500 rounded flex', - }, -}) -export class RowComponent { - ticket = input.required(); - users = input.required(); - - assign = output<{ userId: number; ticketId: number }>(); - closeTicket = output(); - - form = new FormGroup({ - assignee: new FormControl(0, { nonNullable: true }), - }); - - submit() { - this.assign.emit({ - ticketId: this.ticket().id, - userId: this.form.getRawValue().assignee, - }); - } -} diff --git a/apps/testing/29-real-life-application/src/assets/.gitkeep b/apps/testing/29-real-life-application/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/testing/29-real-life-application/src/favicon.ico b/apps/testing/29-real-life-application/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/testing/29-real-life-application/src/favicon.ico and /dev/null differ diff --git a/apps/testing/29-real-life-application/src/index.html b/apps/testing/29-real-life-application/src/index.html deleted file mode 100644 index 91b0bf44a..000000000 --- a/apps/testing/29-real-life-application/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - testing-real-life-application - - - - - - - - diff --git a/apps/testing/29-real-life-application/src/main.ts b/apps/testing/29-real-life-application/src/main.ts deleted file mode 100644 index 7961924bf..000000000 --- a/apps/testing/29-real-life-application/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/testing/29-real-life-application/src/styles.scss b/apps/testing/29-real-life-application/src/styles.scss deleted file mode 100644 index 6be9603e4..000000000 --- a/apps/testing/29-real-life-application/src/styles.scss +++ /dev/null @@ -1,13 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ -html, -body { - height: 100%; -} -body { - margin: 0; - font-family: Roboto, 'Helvetica Neue', sans-serif; -} diff --git a/apps/testing/29-real-life-application/src/test-setup.ts b/apps/testing/29-real-life-application/src/test-setup.ts deleted file mode 100644 index 15de72a3c..000000000 --- a/apps/testing/29-real-life-application/src/test-setup.ts +++ /dev/null @@ -1,2 +0,0 @@ -import '@testing-library/jest-dom'; -import 'jest-preset-angular/setup-jest'; diff --git a/apps/testing/29-real-life-application/tailwind.config.js b/apps/testing/29-real-life-application/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/testing/29-real-life-application/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/testing/29-real-life-application/tsconfig.app.json b/apps/testing/29-real-life-application/tsconfig.app.json deleted file mode 100644 index 5fdad8685..000000000 --- a/apps/testing/29-real-life-application/tsconfig.app.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "cypress/**/*", - "cypress.config.ts", - "**/*.cy.ts", - "**/*.cy.js", - "**/*.cy.tsx", - "**/*.cy.jsx" - ] -} diff --git a/apps/testing/29-real-life-application/tsconfig.editor.json b/apps/testing/29-real-life-application/tsconfig.editor.json deleted file mode 100644 index 8ae117d96..000000000 --- a/apps/testing/29-real-life-application/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/testing/29-real-life-application/tsconfig.json b/apps/testing/29-real-life-application/tsconfig.json deleted file mode 100644 index c0f4e6dd3..000000000 --- a/apps/testing/29-real-life-application/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.editor.json" - }, - { - "path": "./cypress/tsconfig .json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/testing/29-real-life-application/tsconfig.spec.json b/apps/testing/29-real-life-application/tsconfig.spec.json deleted file mode 100644 index c0c092e1e..000000000 --- a/apps/testing/29-real-life-application/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node", "@testing-library/jest-dom"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/typescript/15-function-overload/.eslintrc.json b/apps/typescript/15-function-overload/.eslintrc.json deleted file mode 100644 index bf8df1428..000000000 --- a/apps/typescript/15-function-overload/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - }, - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ] - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/typescript/15-function-overload/README.md b/apps/typescript/15-function-overload/README.md deleted file mode 100644 index 96ce65e9d..000000000 --- a/apps/typescript/15-function-overload/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Function Overload - -> author: thomas-laforge - -### Run Application - -```bash -npx nx serve typescript-function-overload` -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/typescript/15-typescript-function-overload-fn/). diff --git a/apps/typescript/15-function-overload/project.json b/apps/typescript/15-function-overload/project.json deleted file mode 100644 index b36257d9d..000000000 --- a/apps/typescript/15-function-overload/project.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "typescript-function-overload", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/typescript/15-function-overload/src", - "prefix": "app", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/typescript/15-function-overload", - "index": "apps/typescript/15-function-overload/src/index.html", - "main": "apps/typescript/15-function-overload/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/typescript/15-function-overload/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/typescript/15-function-overload/src/favicon.ico", - "apps/typescript/15-function-overload/src/assets" - ], - "styles": ["apps/typescript/15-function-overload/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "typescript-function-overload:build:production" - }, - "development": { - "buildTarget": "typescript-function-overload:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "typescript-function-overload:build" - } - } - } -} diff --git a/apps/typescript/15-function-overload/src/app/app.component.ts b/apps/typescript/15-function-overload/src/app/app.component.ts deleted file mode 100644 index 1f06369c1..000000000 --- a/apps/typescript/15-function-overload/src/app/app.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; -import { createVehicle } from './vehicle.utils'; - -@Component({ - selector: 'app-root', - template: ``, -}) -export class AppComponent { - car = createVehicle('car', 'diesel'); - moto = createVehicle('moto', 'diesel'); - bus = createVehicle('bus', undefined, 20); - boat = createVehicle('boat', undefined, 300, true); - bicycle = createVehicle('bicycle'); -} diff --git a/apps/typescript/15-function-overload/src/app/vehicle.utils.ts b/apps/typescript/15-function-overload/src/app/vehicle.utils.ts deleted file mode 100644 index bec95c08d..000000000 --- a/apps/typescript/15-function-overload/src/app/vehicle.utils.ts +++ /dev/null @@ -1,55 +0,0 @@ -type VehicleType = 'bus' | 'car' | 'moto' | 'bicycle' | 'boat'; -type Fuel = 'diesel' | 'petrol' | 'electric'; - -interface Bicycle { - type: 'bicycle'; -} - -interface Car { - fuel: Fuel; - type: 'car'; -} - -interface Moto { - fuel: Fuel; - type: 'moto'; -} - -interface Bus { - capacity: number; - isPublicTransport: boolean; - type: 'bus'; -} - -interface Boat { - capacity: number; - type: 'boat'; -} - -type Vehicle = Bicycle | Car | Moto | Bus | Boat; - -export function createVehicle( - type: VehicleType, - fuel?: Fuel, - capacity?: number, - isPublicTransport?: boolean, -): Vehicle { - switch (type) { - case 'bicycle': - return { type }; - case 'car': - case 'moto': - if (!fuel) throw new Error(`fuel property is missing for type ${type}`); - return { fuel, type }; - case 'boat': - if (!capacity) - throw new Error(`capacity property is missing for type boat`); - return { capacity, type }; - case 'bus': - if (!capacity) - throw new Error(`capacity property is missing for type bus`); - if (!isPublicTransport) - throw new Error(`isPublicTransport property is missing for type bus`); - return { capacity, isPublicTransport, type }; - } -} diff --git a/apps/typescript/15-function-overload/src/assets/.gitkeep b/apps/typescript/15-function-overload/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/typescript/15-function-overload/src/favicon.ico b/apps/typescript/15-function-overload/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/typescript/15-function-overload/src/favicon.ico and /dev/null differ diff --git a/apps/typescript/15-function-overload/src/index.html b/apps/typescript/15-function-overload/src/index.html deleted file mode 100644 index 37dd3a978..000000000 --- a/apps/typescript/15-function-overload/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - typescript-function-overload - - - - - - - - diff --git a/apps/typescript/15-function-overload/src/main.ts b/apps/typescript/15-function-overload/src/main.ts deleted file mode 100644 index 31c5da482..000000000 --- a/apps/typescript/15-function-overload/src/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent).catch((err) => console.error(err)); diff --git a/apps/typescript/15-function-overload/src/styles.scss b/apps/typescript/15-function-overload/src/styles.scss deleted file mode 100644 index 90d4ee007..000000000 --- a/apps/typescript/15-function-overload/src/styles.scss +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/typescript/15-function-overload/tsconfig.app.json b/apps/typescript/15-function-overload/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/typescript/15-function-overload/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/typescript/15-function-overload/tsconfig.editor.json b/apps/typescript/15-function-overload/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/typescript/15-function-overload/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/typescript/15-function-overload/tsconfig.json b/apps/typescript/15-function-overload/tsconfig.json deleted file mode 100644 index 51c7908c5..000000000 --- a/apps/typescript/15-function-overload/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/apps/typescript/47-enums-vs-union-types/.eslintrc.json b/apps/typescript/47-enums-vs-union-types/.eslintrc.json deleted file mode 100644 index 8ebcbfd59..000000000 --- a/apps/typescript/47-enums-vs-union-types/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "extends": ["../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts"], - "extends": [ - "plugin:@nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": ["*.html"], - "extends": ["plugin:@nx/angular-template"], - "rules": {} - } - ] -} diff --git a/apps/typescript/47-enums-vs-union-types/README.md b/apps/typescript/47-enums-vs-union-types/README.md deleted file mode 100644 index 99aa0acf2..000000000 --- a/apps/typescript/47-enums-vs-union-types/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Enums vs Union Types - -> author: sven-brodny - -### Run Application - -```bash -npx nx serve typescript-enums-vs-union-types -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/typescript/47-enums-vs-union-types/). diff --git a/apps/typescript/47-enums-vs-union-types/project.json b/apps/typescript/47-enums-vs-union-types/project.json deleted file mode 100644 index e5c3283d6..000000000 --- a/apps/typescript/47-enums-vs-union-types/project.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "typescript-enums-vs-union-types", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "prefix": "app", - "sourceRoot": "apps/typescript/47-enums-vs-union-types/src", - "tags": [], - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/typescript/47-enums-vs-union-types", - "index": "apps/typescript/47-enums-vs-union-types/src/index.html", - "browser": "apps/typescript/47-enums-vs-union-types/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/typescript/47-enums-vs-union-types/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/typescript/47-enums-vs-union-types/src/favicon.ico", - "apps/typescript/47-enums-vs-union-types/src/assets" - ], - "styles": ["apps/typescript/47-enums-vs-union-types/src/styles.scss"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "executor": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "typescript-enums-vs-union-types:build:production" - }, - "development": { - "buildTarget": "typescript-enums-vs-union-types:build:development" - } - }, - "defaultConfiguration": "development", - "continuous": true - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "typescript-enums-vs-union-types:build" - } - } - } -} diff --git a/apps/typescript/47-enums-vs-union-types/src/app/app.component.ts b/apps/typescript/47-enums-vs-union-types/src/app/app.component.ts deleted file mode 100644 index 05886724f..000000000 --- a/apps/typescript/47-enums-vs-union-types/src/app/app.component.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Component, computed, signal } from '@angular/core'; - -enum Difficulty { - EASY = 'easy', - NORMAL = 'normal', -} - -enum Direction { - LEFT = 'left', - RIGHT = 'right', -} - -@Component({ - imports: [], - selector: 'app-root', - template: ` -
    -
    - - -
    -

    Selected Difficulty: {{ difficultyLabel() }}

    -
    - -
    -
    - - -
    -

    {{ directionLabel() }}

    -
    - `, - styles: ` - section { - @apply mx-auto my-5 flex w-fit flex-col items-center gap-2; - - > div { - @apply flex w-fit gap-5; - } - } - - button { - @apply rounded-md border px-4 py-2; - } - `, -}) -export class AppComponent { - readonly Difficulty = Difficulty; - readonly difficulty = signal(Difficulty.EASY); - - readonly Direction = Direction; - readonly direction = signal(undefined); - - readonly difficultyLabel = computed(() => { - switch (this.difficulty()) { - case Difficulty.EASY: - return Difficulty.EASY; - case Difficulty.NORMAL: - return Difficulty.NORMAL; - } - }); - - readonly directionLabel = computed(() => { - const prefix = 'You chose to go'; - switch (this.direction()) { - case Direction.LEFT: - return `${prefix} ${Direction.LEFT}`; - case Direction.RIGHT: - return `${prefix} ${Direction.RIGHT}`; - default: - return 'Choose a direction!'; - } - }); -} diff --git a/apps/typescript/47-enums-vs-union-types/src/app/app.config.ts b/apps/typescript/47-enums-vs-union-types/src/app/app.config.ts deleted file mode 100644 index 81a6edde4..000000000 --- a/apps/typescript/47-enums-vs-union-types/src/app/app.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; - -export const appConfig: ApplicationConfig = { - providers: [], -}; diff --git a/apps/typescript/47-enums-vs-union-types/src/assets/.gitkeep b/apps/typescript/47-enums-vs-union-types/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/typescript/47-enums-vs-union-types/src/favicon.ico b/apps/typescript/47-enums-vs-union-types/src/favicon.ico deleted file mode 100644 index 317ebcb23..000000000 Binary files a/apps/typescript/47-enums-vs-union-types/src/favicon.ico and /dev/null differ diff --git a/apps/typescript/47-enums-vs-union-types/src/index.html b/apps/typescript/47-enums-vs-union-types/src/index.html deleted file mode 100644 index 1b677a046..000000000 --- a/apps/typescript/47-enums-vs-union-types/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - typescript-enums-vs-union-types - - - - - - - - diff --git a/apps/typescript/47-enums-vs-union-types/src/main.ts b/apps/typescript/47-enums-vs-union-types/src/main.ts deleted file mode 100644 index f3a7223da..000000000 --- a/apps/typescript/47-enums-vs-union-types/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err), -); diff --git a/apps/typescript/47-enums-vs-union-types/src/styles.scss b/apps/typescript/47-enums-vs-union-types/src/styles.scss deleted file mode 100644 index 77e408aa8..000000000 --- a/apps/typescript/47-enums-vs-union-types/src/styles.scss +++ /dev/null @@ -1,5 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* You can add global styles to this file, and also import other style files */ diff --git a/apps/typescript/47-enums-vs-union-types/tailwind.config.js b/apps/typescript/47-enums-vs-union-types/tailwind.config.js deleted file mode 100644 index 38183db2c..000000000 --- a/apps/typescript/47-enums-vs-union-types/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind'); -const { join } = require('path'); - -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: [ - join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'), - ...createGlobPatternsForDependencies(__dirname), - ], - theme: { - extend: {}, - }, - plugins: [], -}; diff --git a/apps/typescript/47-enums-vs-union-types/tsconfig.app.json b/apps/typescript/47-enums-vs-union-types/tsconfig.app.json deleted file mode 100644 index 8b5631268..000000000 --- a/apps/typescript/47-enums-vs-union-types/tsconfig.app.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": [], - "moduleResolution": "bundler" - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/typescript/47-enums-vs-union-types/tsconfig.editor.json b/apps/typescript/47-enums-vs-union-types/tsconfig.editor.json deleted file mode 100644 index 4ee639340..000000000 --- a/apps/typescript/47-enums-vs-union-types/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": [] - } -} diff --git a/apps/typescript/47-enums-vs-union-types/tsconfig.json b/apps/typescript/47-enums-vs-union-types/tsconfig.json deleted file mode 100644 index b94f8837d..000000000 --- a/apps/typescript/47-enums-vs-union-types/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "es2022", - "useDefineForClassFields": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.editor.json" - } - ], - "extends": "../../../tsconfig.base.json", - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -}