feat(doc): move bug-cd

This commit is contained in:
thomas
2023-10-18 09:58:17 +02:00
parent a4edf05eac
commit db75a7bb7e
35 changed files with 43 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
{ {
"extends": ["../../.eslintrc.json"], "extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"], "ignorePatterns": ["!**/*"],
"overrides": [ "overrides": [
{ {

View File

@@ -5,9 +5,9 @@
### Run Application ### Run Application
```bash ```bash
npx nx serve bug-cd npx nx serve angular-bug-cd
``` ```
### Documentation and Instruction ### Documentation and Instruction
Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular-performance/32-bug-cd/). Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular-performance/32-angular-bug-cd/).

View File

@@ -1,9 +1,9 @@
/* eslint-disable */ /* eslint-disable */
export default { export default {
displayName: 'bug-cd', displayName: 'angular-bug-cd',
preset: '../../jest.preset.js', preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/apps/bug-cd', coverageDirectory: '../../../coverage/apps/angular/bug-cd',
transform: { transform: {
'^.+\\.(ts|mjs|js|html)$': [ '^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',

View File

@@ -1,22 +1,25 @@
{ {
"name": "bug-cd", "name": "angular-bug-cd",
"$schema": "../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "application", "projectType": "application",
"prefix": "app", "prefix": "app",
"sourceRoot": "apps/bug-cd/src", "sourceRoot": "apps/angular/bug-cd/src",
"tags": [], "tags": [],
"targets": { "targets": {
"build": { "build": {
"executor": "@angular-devkit/build-angular:browser", "executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"], "outputs": ["{options.outputPath}"],
"options": { "options": {
"outputPath": "dist/apps/bug-cd", "outputPath": "dist/apps/angular/bug-cd",
"index": "apps/bug-cd/src/index.html", "index": "apps/angular/bug-cd/src/index.html",
"main": "apps/bug-cd/src/main.ts", "main": "apps/angular/bug-cd/src/main.ts",
"polyfills": ["zone.js"], "polyfills": ["zone.js"],
"tsConfig": "apps/bug-cd/tsconfig.app.json", "tsConfig": "apps/angular/bug-cd/tsconfig.app.json",
"assets": ["apps/bug-cd/src/favicon.ico", "apps/bug-cd/src/assets"], "assets": [
"styles": ["apps/bug-cd/src/styles.scss"], "apps/angular/bug-cd/src/favicon.ico",
"apps/angular/bug-cd/src/assets"
],
"styles": ["apps/angular/bug-cd/src/styles.scss"],
"scripts": [] "scripts": []
}, },
"configurations": { "configurations": {
@@ -50,10 +53,10 @@
"executor": "@angular-devkit/build-angular:dev-server", "executor": "@angular-devkit/build-angular:dev-server",
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "bug-cd:build:production" "browserTarget": "angular-bug-cd:build:production"
}, },
"development": { "development": {
"browserTarget": "bug-cd:build:development" "browserTarget": "angular-bug-cd:build:development"
} }
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"
@@ -61,21 +64,24 @@
"extract-i18n": { "extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n", "executor": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "bug-cd:build" "browserTarget": "angular-bug-cd:build"
} }
}, },
"lint": { "lint": {
"executor": "@nx/linter:eslint", "executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"], "outputs": ["{options.outputFile}"],
"options": { "options": {
"lintFilePatterns": ["apps/bug-cd/**/*.ts", "apps/bug-cd/**/*.html"] "lintFilePatterns": [
"apps/angular/bug-cd/**/*.ts",
"apps/angular/bug-cd/**/*.html"
]
} }
}, },
"test": { "test": {
"executor": "@nx/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": { "options": {
"jestConfig": "apps/bug-cd/jest.config.ts", "jestConfig": "apps/angular/bug-cd/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
}, },
"configurations": { "configurations": {

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,7 +1,7 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"types": [] "types": []
}, },
"files": ["src/main.ts"], "files": ["src/main.ts"],

View File

@@ -22,7 +22,7 @@
"path": "./tsconfig.editor.json" "path": "./tsconfig.editor.json"
} }
], ],
"extends": "../../tsconfig.base.json", "extends": "../../../tsconfig.base.json",
"angularCompilerOptions": { "angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false, "enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true, "strictInjectionParameters": true,

View File

@@ -1,7 +1,7 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../../dist/out-tsc",
"module": "commonjs", "module": "commonjs",
"types": ["jest", "node", "@testing-library/jest-dom"] "types": ["jest", "node", "@testing-library/jest-dom"]
}, },

View File

@@ -3,7 +3,7 @@ title: 🟢 Projection
description: Challenge 1 is about learning how to project DOM element through components description: Challenge 1 is about learning how to project DOM element through components
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 1 challengeNumber: 1
command: projection command: angular-projection
blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5 blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5
videoLink: videoLink:
link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq

View File

@@ -3,7 +3,7 @@ title: 🟠 Highly Customizable CSS
description: Challenge 13 is about creating highly customizable CSS styles description: Challenge 13 is about creating highly customizable CSS styles
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 13 challengeNumber: 13
command: styling command: angular-styling
sidebar: sidebar:
order: 104 order: 104
--- ---
@@ -12,8 +12,6 @@ sidebar:
WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue. WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue.
::: :::
<div class="chip">Challenge #13</div>
## Information ## Information
Styling is an important aspect of a frontend developer's day job, but it is often underestimated. In Angular applications, I frequently see people using `@Input()` to customize the style of their components. However, `@Input()` should only be used for logic; and other techniques, such as CSS variables and host-context, should be used for styling. Styling is an important aspect of a frontend developer's day job, but it is often underestimated. In Angular applications, I frequently see people using `@Input()` to customize the style of their components. However, `@Input()` should only be used for logic; and other techniques, such as CSS variables and host-context, should be used for styling.

View File

@@ -3,7 +3,7 @@ title: 🔴 Master Dependancy Injection
description: Challenge 16 is about masjering how dependancy injection works description: Challenge 16 is about masjering how dependancy injection works
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 16 challengeNumber: 16
command: di command: angular-di
sidebar: sidebar:
order: 203 order: 203
--- ---

View File

@@ -3,7 +3,7 @@ title: 🟢 @RouterInput()
description: Challenge 22 is about using the @Input decorator to retreive router params. description: Challenge 22 is about using the @Input decorator to retreive router params.
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 22 challengeNumber: 22
command: router-input command: angular-router-input
blogLink: https://medium.com/ngconf/accessing-route-params-in-angular-1f8e12770617 blogLink: https://medium.com/ngconf/accessing-route-params-in-angular-1f8e12770617
sidebar: sidebar:
order: 5 order: 5

View File

@@ -3,7 +3,7 @@ title: 🟠 Directive Enhancement
description: Challenge 3 is about enhancing a built-in directive description: Challenge 3 is about enhancing a built-in directive
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 3 challengeNumber: 3
command: ngfor-enhancement command: angular-ngfor-enhancement
blogLink: https://medium.com/@thomas.laforge/ngfor-enhancement-716b44656a6c blogLink: https://medium.com/@thomas.laforge/ngfor-enhancement-716b44656a6c
sidebar: sidebar:
order: 101 order: 101

View File

@@ -3,7 +3,7 @@ title: 🔴 Interoperability Rxjs/Signal
description: Challenge 30 is about learning how to mix signal with Rxjs description: Challenge 30 is about learning how to mix signal with Rxjs
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 30 challengeNumber: 30
command: interop-rxjs-signal command: angular-interop-rxjs-signal
sidebar: sidebar:
order: 204 order: 204
--- ---

View File

@@ -3,7 +3,7 @@ title: 🟢 Module to Standalone
description: Challenge 31 is about migrating a module based application to a standalone application. description: Challenge 31 is about migrating a module based application to a standalone application.
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 31 challengeNumber: 31
command: module-to-standalone command: angular-module-to-standalone
sidebar: sidebar:
order: 6 order: 6
--- ---

View File

@@ -3,7 +3,7 @@ title: 🟠 Change Detection Bug
description: Challenge 32 is about debugging an application that has issue when change detection is triggered description: Challenge 32 is about debugging an application that has issue when change detection is triggered
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 32 challengeNumber: 32
command: bug-cd command: angular-bug-cd
blogLink: https://medium.com/ngconf/function-calls-inside-template-are-dangerous-15f9822a6629 blogLink: https://medium.com/ngconf/function-calls-inside-template-are-dangerous-15f9822a6629
sidebar: sidebar:
order: 105 order: 105

View File

@@ -3,7 +3,7 @@ title: 🟠 Decoupling Components
description: Challenge 33 is about decoupling two strongly coupled components using Injection Token description: Challenge 33 is about decoupling two strongly coupled components using Injection Token
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 33 challengeNumber: 33
command: decoupling command: angular-decoupling
sidebar: sidebar:
order: 106 order: 106
--- ---

View File

@@ -3,7 +3,7 @@ title: 🔴 Typed ContextOutlet
description: Challenge 4 is about strongly typing ngContextOutlet directives description: Challenge 4 is about strongly typing ngContextOutlet directives
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 4 challengeNumber: 4
command: context-outlet-type command: angular-context-outlet-type
blogLink: https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6 blogLink: https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6
sidebar: sidebar:
order: 201 order: 201

View File

@@ -3,7 +3,7 @@ title: 🟢 Crud application
description: Challenge 5 is about refactoring a crud application description: Challenge 5 is about refactoring a crud application
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 5 challengeNumber: 5
command: crud command: angular-crud
sidebar: sidebar:
order: 2 order: 2
--- ---

View File

@@ -3,7 +3,7 @@ title: 🟠 Structural Directive
description: Challenge 6 is about creating a structural directive to handle permissions description: Challenge 6 is about creating a structural directive to handle permissions
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 6 challengeNumber: 6
command: permissions command: angular-permissions
blogLink: https://medium.com/@thomas.laforge/create-a-custom-structural-directive-to-manage-permissions-like-a-pro-11a1acad30ad blogLink: https://medium.com/@thomas.laforge/create-a-custom-structural-directive-to-manage-permissions-like-a-pro-11a1acad30ad
sidebar: sidebar:
order: 102 order: 102

View File

@@ -3,7 +3,7 @@ title: 🟢 Pure Pipe
description: Challenge 8 is about creating a pure pipe description: Challenge 8 is about creating a pure pipe
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 8 challengeNumber: 8
command: pipe-easy command: angular-pipe-easy
blogLink: https://medium.com/ngconf/deep-dive-into-angular-pipes-c040588cd15d blogLink: https://medium.com/ngconf/deep-dive-into-angular-pipes-c040588cd15d
sidebar: sidebar:
order: 3 order: 3

View File

@@ -3,7 +3,7 @@ title: 🟠 Wrap Function Pipe
description: Challenge 9 is about creating a pipe to wrap component fonctions description: Challenge 9 is about creating a pipe to wrap component fonctions
author: Thomas Laforge author: Thomas Laforge
challengeNumber: 9 challengeNumber: 9
command: pipe-intermediate command: angular-pipe-intermediate
blogLink: https://medium.com/ngconf/boost-your-apps-performance-by-wrapping-your-functions-inside-a-pipe-7e889a901d1d blogLink: https://medium.com/ngconf/boost-your-apps-performance-by-wrapping-your-functions-inside-a-pipe-7e889a901d1d
sidebar: sidebar:
order: 103 order: 103