From db75a7bb7ea9f8f54b4e419dae0d893c8bfecc93 Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 18 Oct 2023 09:58:17 +0200 Subject: [PATCH] feat(doc): move bug-cd --- apps/{ => angular}/bug-cd/.eslintrc.json | 2 +- apps/{ => angular}/bug-cd/README.md | 4 +-- apps/{ => angular}/bug-cd/jest.config.ts | 6 ++-- apps/{ => angular}/bug-cd/project.json | 34 ++++++++++-------- .../bug-cd/src/app/app.component.ts | 0 .../bug-cd/src/app/app.config.ts | 0 .../bug-cd/src/app/bar.component.ts | 0 .../bug-cd/src/app/fake.service.ts | 0 .../bug-cd/src/app/foo.component.ts | 0 .../src/app/main-navigation.component.ts | 0 apps/{ => angular}/bug-cd/src/assets/.gitkeep | 0 apps/{ => angular}/bug-cd/src/favicon.ico | Bin apps/{ => angular}/bug-cd/src/index.html | 0 apps/{ => angular}/bug-cd/src/main.ts | 0 apps/{ => angular}/bug-cd/src/styles.scss | 0 apps/{ => angular}/bug-cd/src/test-setup.ts | 0 apps/{ => angular}/bug-cd/tailwind.config.js | 0 apps/{ => angular}/bug-cd/tsconfig.app.json | 2 +- .../{ => angular}/bug-cd/tsconfig.editor.json | 0 apps/{ => angular}/bug-cd/tsconfig.json | 2 +- apps/{ => angular}/bug-cd/tsconfig.spec.json | 2 +- .../docs/challenges/angular/1-projection.md | 2 +- .../docs/challenges/angular/13-styling.md | 4 +-- .../content/docs/challenges/angular/16-di.md | 2 +- .../challenges/angular/22-router-input.md | 2 +- .../angular/3-directive-enhancement.md | 2 +- .../angular/30-interop-rxjs-signal.md | 2 +- .../angular/31-module-to-standalone.md | 2 +- .../docs/challenges/angular/32-bug-cd.md | 2 +- .../docs/challenges/angular/33-decoupling.md | 2 +- .../angular/4-context-outlet-typed.md | 2 +- .../content/docs/challenges/angular/5-crud.md | 2 +- .../docs/challenges/angular/6-permissions.md | 2 +- .../docs/challenges/angular/8-pipe-pure.md | 2 +- .../docs/challenges/angular/9-pipe-wrapFn.md | 2 +- 35 files changed, 43 insertions(+), 39 deletions(-) rename apps/{ => angular}/bug-cd/.eslintrc.json (94%) rename apps/{ => angular}/bug-cd/README.md (67%) rename apps/{ => angular}/bug-cd/jest.config.ts (81%) rename apps/{ => angular}/bug-cd/project.json (66%) rename apps/{ => angular}/bug-cd/src/app/app.component.ts (100%) rename apps/{ => angular}/bug-cd/src/app/app.config.ts (100%) rename apps/{ => angular}/bug-cd/src/app/bar.component.ts (100%) rename apps/{ => angular}/bug-cd/src/app/fake.service.ts (100%) rename apps/{ => angular}/bug-cd/src/app/foo.component.ts (100%) rename apps/{ => angular}/bug-cd/src/app/main-navigation.component.ts (100%) rename apps/{ => angular}/bug-cd/src/assets/.gitkeep (100%) rename apps/{ => angular}/bug-cd/src/favicon.ico (100%) rename apps/{ => angular}/bug-cd/src/index.html (100%) rename apps/{ => angular}/bug-cd/src/main.ts (100%) rename apps/{ => angular}/bug-cd/src/styles.scss (100%) rename apps/{ => angular}/bug-cd/src/test-setup.ts (100%) rename apps/{ => angular}/bug-cd/tailwind.config.js (100%) rename apps/{ => angular}/bug-cd/tsconfig.app.json (84%) rename apps/{ => angular}/bug-cd/tsconfig.editor.json (100%) rename apps/{ => angular}/bug-cd/tsconfig.json (94%) rename apps/{ => angular}/bug-cd/tsconfig.spec.json (88%) diff --git a/apps/bug-cd/.eslintrc.json b/apps/angular/bug-cd/.eslintrc.json similarity index 94% rename from apps/bug-cd/.eslintrc.json rename to apps/angular/bug-cd/.eslintrc.json index b428c22..bf8df14 100644 --- a/apps/bug-cd/.eslintrc.json +++ b/apps/angular/bug-cd/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json"], + "extends": ["../../../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { diff --git a/apps/bug-cd/README.md b/apps/angular/bug-cd/README.md similarity index 67% rename from apps/bug-cd/README.md rename to apps/angular/bug-cd/README.md index 7882cb3..2d1491e 100644 --- a/apps/bug-cd/README.md +++ b/apps/angular/bug-cd/README.md @@ -5,9 +5,9 @@ ### Run Application ```bash -npx nx serve bug-cd +npx nx serve angular-bug-cd ``` ### 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/). diff --git a/apps/bug-cd/jest.config.ts b/apps/angular/bug-cd/jest.config.ts similarity index 81% rename from apps/bug-cd/jest.config.ts rename to apps/angular/bug-cd/jest.config.ts index 01794b1..1f24a7c 100644 --- a/apps/bug-cd/jest.config.ts +++ b/apps/angular/bug-cd/jest.config.ts @@ -1,9 +1,9 @@ /* eslint-disable */ export default { - displayName: 'bug-cd', - preset: '../../jest.preset.js', + displayName: 'angular-bug-cd', + preset: '../../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../coverage/apps/bug-cd', + coverageDirectory: '../../../coverage/apps/angular/bug-cd', transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/bug-cd/project.json b/apps/angular/bug-cd/project.json similarity index 66% rename from apps/bug-cd/project.json rename to apps/angular/bug-cd/project.json index d9f984c..99b7c16 100644 --- a/apps/bug-cd/project.json +++ b/apps/angular/bug-cd/project.json @@ -1,22 +1,25 @@ { - "name": "bug-cd", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "angular-bug-cd", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "prefix": "app", - "sourceRoot": "apps/bug-cd/src", + "sourceRoot": "apps/angular/bug-cd/src", "tags": [], "targets": { "build": { "executor": "@angular-devkit/build-angular:browser", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/apps/bug-cd", - "index": "apps/bug-cd/src/index.html", - "main": "apps/bug-cd/src/main.ts", + "outputPath": "dist/apps/angular/bug-cd", + "index": "apps/angular/bug-cd/src/index.html", + "main": "apps/angular/bug-cd/src/main.ts", "polyfills": ["zone.js"], - "tsConfig": "apps/bug-cd/tsconfig.app.json", - "assets": ["apps/bug-cd/src/favicon.ico", "apps/bug-cd/src/assets"], - "styles": ["apps/bug-cd/src/styles.scss"], + "tsConfig": "apps/angular/bug-cd/tsconfig.app.json", + "assets": [ + "apps/angular/bug-cd/src/favicon.ico", + "apps/angular/bug-cd/src/assets" + ], + "styles": ["apps/angular/bug-cd/src/styles.scss"], "scripts": [] }, "configurations": { @@ -50,10 +53,10 @@ "executor": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "bug-cd:build:production" + "browserTarget": "angular-bug-cd:build:production" }, "development": { - "browserTarget": "bug-cd:build:development" + "browserTarget": "angular-bug-cd:build:development" } }, "defaultConfiguration": "development" @@ -61,21 +64,24 @@ "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "bug-cd:build" + "browserTarget": "angular-bug-cd:build" } }, "lint": { "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["apps/bug-cd/**/*.ts", "apps/bug-cd/**/*.html"] + "lintFilePatterns": [ + "apps/angular/bug-cd/**/*.ts", + "apps/angular/bug-cd/**/*.html" + ] } }, "test": { "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/bug-cd/jest.config.ts", + "jestConfig": "apps/angular/bug-cd/jest.config.ts", "passWithNoTests": true }, "configurations": { diff --git a/apps/bug-cd/src/app/app.component.ts b/apps/angular/bug-cd/src/app/app.component.ts similarity index 100% rename from apps/bug-cd/src/app/app.component.ts rename to apps/angular/bug-cd/src/app/app.component.ts diff --git a/apps/bug-cd/src/app/app.config.ts b/apps/angular/bug-cd/src/app/app.config.ts similarity index 100% rename from apps/bug-cd/src/app/app.config.ts rename to apps/angular/bug-cd/src/app/app.config.ts diff --git a/apps/bug-cd/src/app/bar.component.ts b/apps/angular/bug-cd/src/app/bar.component.ts similarity index 100% rename from apps/bug-cd/src/app/bar.component.ts rename to apps/angular/bug-cd/src/app/bar.component.ts diff --git a/apps/bug-cd/src/app/fake.service.ts b/apps/angular/bug-cd/src/app/fake.service.ts similarity index 100% rename from apps/bug-cd/src/app/fake.service.ts rename to apps/angular/bug-cd/src/app/fake.service.ts diff --git a/apps/bug-cd/src/app/foo.component.ts b/apps/angular/bug-cd/src/app/foo.component.ts similarity index 100% rename from apps/bug-cd/src/app/foo.component.ts rename to apps/angular/bug-cd/src/app/foo.component.ts diff --git a/apps/bug-cd/src/app/main-navigation.component.ts b/apps/angular/bug-cd/src/app/main-navigation.component.ts similarity index 100% rename from apps/bug-cd/src/app/main-navigation.component.ts rename to apps/angular/bug-cd/src/app/main-navigation.component.ts diff --git a/apps/bug-cd/src/assets/.gitkeep b/apps/angular/bug-cd/src/assets/.gitkeep similarity index 100% rename from apps/bug-cd/src/assets/.gitkeep rename to apps/angular/bug-cd/src/assets/.gitkeep diff --git a/apps/bug-cd/src/favicon.ico b/apps/angular/bug-cd/src/favicon.ico similarity index 100% rename from apps/bug-cd/src/favicon.ico rename to apps/angular/bug-cd/src/favicon.ico diff --git a/apps/bug-cd/src/index.html b/apps/angular/bug-cd/src/index.html similarity index 100% rename from apps/bug-cd/src/index.html rename to apps/angular/bug-cd/src/index.html diff --git a/apps/bug-cd/src/main.ts b/apps/angular/bug-cd/src/main.ts similarity index 100% rename from apps/bug-cd/src/main.ts rename to apps/angular/bug-cd/src/main.ts diff --git a/apps/bug-cd/src/styles.scss b/apps/angular/bug-cd/src/styles.scss similarity index 100% rename from apps/bug-cd/src/styles.scss rename to apps/angular/bug-cd/src/styles.scss diff --git a/apps/bug-cd/src/test-setup.ts b/apps/angular/bug-cd/src/test-setup.ts similarity index 100% rename from apps/bug-cd/src/test-setup.ts rename to apps/angular/bug-cd/src/test-setup.ts diff --git a/apps/bug-cd/tailwind.config.js b/apps/angular/bug-cd/tailwind.config.js similarity index 100% rename from apps/bug-cd/tailwind.config.js rename to apps/angular/bug-cd/tailwind.config.js diff --git a/apps/bug-cd/tsconfig.app.json b/apps/angular/bug-cd/tsconfig.app.json similarity index 84% rename from apps/bug-cd/tsconfig.app.json rename to apps/angular/bug-cd/tsconfig.app.json index fff4a41..5822042 100644 --- a/apps/bug-cd/tsconfig.app.json +++ b/apps/angular/bug-cd/tsconfig.app.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "types": [] }, "files": ["src/main.ts"], diff --git a/apps/bug-cd/tsconfig.editor.json b/apps/angular/bug-cd/tsconfig.editor.json similarity index 100% rename from apps/bug-cd/tsconfig.editor.json rename to apps/angular/bug-cd/tsconfig.editor.json diff --git a/apps/bug-cd/tsconfig.json b/apps/angular/bug-cd/tsconfig.json similarity index 94% rename from apps/bug-cd/tsconfig.json rename to apps/angular/bug-cd/tsconfig.json index e01cf19..e85865c 100644 --- a/apps/bug-cd/tsconfig.json +++ b/apps/angular/bug-cd/tsconfig.json @@ -22,7 +22,7 @@ "path": "./tsconfig.editor.json" } ], - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, diff --git a/apps/bug-cd/tsconfig.spec.json b/apps/angular/bug-cd/tsconfig.spec.json similarity index 88% rename from apps/bug-cd/tsconfig.spec.json rename to apps/angular/bug-cd/tsconfig.spec.json index 1a4817a..c0c092e 100644 --- a/apps/bug-cd/tsconfig.spec.json +++ b/apps/angular/bug-cd/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "../../../dist/out-tsc", "module": "commonjs", "types": ["jest", "node", "@testing-library/jest-dom"] }, diff --git a/docs/src/content/docs/challenges/angular/1-projection.md b/docs/src/content/docs/challenges/angular/1-projection.md index f835d02..024f242 100644 --- a/docs/src/content/docs/challenges/angular/1-projection.md +++ b/docs/src/content/docs/challenges/angular/1-projection.md @@ -3,7 +3,7 @@ title: 🟢 Projection description: Challenge 1 is about learning how to project DOM element through components author: Thomas Laforge challengeNumber: 1 -command: projection +command: angular-projection blogLink: https://medium.com/@thomas.laforge/create-a-highly-customizable-component-cc3a9805e4c5 videoLink: link: https://www.youtube.com/watch?v=npyEyUZxoIw&ab_channel=ArthurLannelucq diff --git a/docs/src/content/docs/challenges/angular/13-styling.md b/docs/src/content/docs/challenges/angular/13-styling.md index d7c87a5..64485da 100644 --- a/docs/src/content/docs/challenges/angular/13-styling.md +++ b/docs/src/content/docs/challenges/angular/13-styling.md @@ -3,7 +3,7 @@ title: 🟠 Highly Customizable CSS description: Challenge 13 is about creating highly customizable CSS styles author: Thomas Laforge challengeNumber: 13 -command: styling +command: angular-styling sidebar: 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. ::: -
Challenge #13
- ## 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. diff --git a/docs/src/content/docs/challenges/angular/16-di.md b/docs/src/content/docs/challenges/angular/16-di.md index be8dcb7..7a65158 100644 --- a/docs/src/content/docs/challenges/angular/16-di.md +++ b/docs/src/content/docs/challenges/angular/16-di.md @@ -3,7 +3,7 @@ title: 🔴 Master Dependancy Injection description: Challenge 16 is about masjering how dependancy injection works author: Thomas Laforge challengeNumber: 16 -command: di +command: angular-di sidebar: order: 203 --- diff --git a/docs/src/content/docs/challenges/angular/22-router-input.md b/docs/src/content/docs/challenges/angular/22-router-input.md index 3347839..9a25161 100644 --- a/docs/src/content/docs/challenges/angular/22-router-input.md +++ b/docs/src/content/docs/challenges/angular/22-router-input.md @@ -3,7 +3,7 @@ title: 🟢 @RouterInput() description: Challenge 22 is about using the @Input decorator to retreive router params. author: Thomas Laforge challengeNumber: 22 -command: router-input +command: angular-router-input blogLink: https://medium.com/ngconf/accessing-route-params-in-angular-1f8e12770617 sidebar: order: 5 diff --git a/docs/src/content/docs/challenges/angular/3-directive-enhancement.md b/docs/src/content/docs/challenges/angular/3-directive-enhancement.md index 433b1cd..7027387 100644 --- a/docs/src/content/docs/challenges/angular/3-directive-enhancement.md +++ b/docs/src/content/docs/challenges/angular/3-directive-enhancement.md @@ -3,7 +3,7 @@ title: 🟠 Directive Enhancement description: Challenge 3 is about enhancing a built-in directive author: Thomas Laforge challengeNumber: 3 -command: ngfor-enhancement +command: angular-ngfor-enhancement blogLink: https://medium.com/@thomas.laforge/ngfor-enhancement-716b44656a6c sidebar: order: 101 diff --git a/docs/src/content/docs/challenges/angular/30-interop-rxjs-signal.md b/docs/src/content/docs/challenges/angular/30-interop-rxjs-signal.md index d00b54b..b668655 100644 --- a/docs/src/content/docs/challenges/angular/30-interop-rxjs-signal.md +++ b/docs/src/content/docs/challenges/angular/30-interop-rxjs-signal.md @@ -3,7 +3,7 @@ title: 🔴 Interoperability Rxjs/Signal description: Challenge 30 is about learning how to mix signal with Rxjs author: Thomas Laforge challengeNumber: 30 -command: interop-rxjs-signal +command: angular-interop-rxjs-signal sidebar: order: 204 --- diff --git a/docs/src/content/docs/challenges/angular/31-module-to-standalone.md b/docs/src/content/docs/challenges/angular/31-module-to-standalone.md index 9372f53..3b36490 100644 --- a/docs/src/content/docs/challenges/angular/31-module-to-standalone.md +++ b/docs/src/content/docs/challenges/angular/31-module-to-standalone.md @@ -3,7 +3,7 @@ title: 🟢 Module to Standalone description: Challenge 31 is about migrating a module based application to a standalone application. author: Thomas Laforge challengeNumber: 31 -command: module-to-standalone +command: angular-module-to-standalone sidebar: order: 6 --- diff --git a/docs/src/content/docs/challenges/angular/32-bug-cd.md b/docs/src/content/docs/challenges/angular/32-bug-cd.md index 493952e..e33d3e2 100644 --- a/docs/src/content/docs/challenges/angular/32-bug-cd.md +++ b/docs/src/content/docs/challenges/angular/32-bug-cd.md @@ -3,7 +3,7 @@ title: 🟠 Change Detection Bug description: Challenge 32 is about debugging an application that has issue when change detection is triggered author: Thomas Laforge challengeNumber: 32 -command: bug-cd +command: angular-bug-cd blogLink: https://medium.com/ngconf/function-calls-inside-template-are-dangerous-15f9822a6629 sidebar: order: 105 diff --git a/docs/src/content/docs/challenges/angular/33-decoupling.md b/docs/src/content/docs/challenges/angular/33-decoupling.md index e5fadd4..ec2638d 100644 --- a/docs/src/content/docs/challenges/angular/33-decoupling.md +++ b/docs/src/content/docs/challenges/angular/33-decoupling.md @@ -3,7 +3,7 @@ title: 🟠 Decoupling Components description: Challenge 33 is about decoupling two strongly coupled components using Injection Token author: Thomas Laforge challengeNumber: 33 -command: decoupling +command: angular-decoupling sidebar: order: 106 --- diff --git a/docs/src/content/docs/challenges/angular/4-context-outlet-typed.md b/docs/src/content/docs/challenges/angular/4-context-outlet-typed.md index 8ca906f..7373a6f 100644 --- a/docs/src/content/docs/challenges/angular/4-context-outlet-typed.md +++ b/docs/src/content/docs/challenges/angular/4-context-outlet-typed.md @@ -3,7 +3,7 @@ title: 🔴 Typed ContextOutlet description: Challenge 4 is about strongly typing ngContextOutlet directives author: Thomas Laforge challengeNumber: 4 -command: context-outlet-type +command: angular-context-outlet-type blogLink: https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6 sidebar: order: 201 diff --git a/docs/src/content/docs/challenges/angular/5-crud.md b/docs/src/content/docs/challenges/angular/5-crud.md index 5b53ed6..7391807 100644 --- a/docs/src/content/docs/challenges/angular/5-crud.md +++ b/docs/src/content/docs/challenges/angular/5-crud.md @@ -3,7 +3,7 @@ title: 🟢 Crud application description: Challenge 5 is about refactoring a crud application author: Thomas Laforge challengeNumber: 5 -command: crud +command: angular-crud sidebar: order: 2 --- diff --git a/docs/src/content/docs/challenges/angular/6-permissions.md b/docs/src/content/docs/challenges/angular/6-permissions.md index 4286a1c..d85845a 100644 --- a/docs/src/content/docs/challenges/angular/6-permissions.md +++ b/docs/src/content/docs/challenges/angular/6-permissions.md @@ -3,7 +3,7 @@ title: 🟠 Structural Directive description: Challenge 6 is about creating a structural directive to handle permissions author: Thomas Laforge 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 sidebar: order: 102 diff --git a/docs/src/content/docs/challenges/angular/8-pipe-pure.md b/docs/src/content/docs/challenges/angular/8-pipe-pure.md index 8baadef..e94b3f7 100644 --- a/docs/src/content/docs/challenges/angular/8-pipe-pure.md +++ b/docs/src/content/docs/challenges/angular/8-pipe-pure.md @@ -3,7 +3,7 @@ title: 🟢 Pure Pipe description: Challenge 8 is about creating a pure pipe author: Thomas Laforge challengeNumber: 8 -command: pipe-easy +command: angular-pipe-easy blogLink: https://medium.com/ngconf/deep-dive-into-angular-pipes-c040588cd15d sidebar: order: 3 diff --git a/docs/src/content/docs/challenges/angular/9-pipe-wrapFn.md b/docs/src/content/docs/challenges/angular/9-pipe-wrapFn.md index 78b119d..24b0b4a 100644 --- a/docs/src/content/docs/challenges/angular/9-pipe-wrapFn.md +++ b/docs/src/content/docs/challenges/angular/9-pipe-wrapFn.md @@ -3,7 +3,7 @@ title: 🟠 Wrap Function Pipe description: Challenge 9 is about creating a pipe to wrap component fonctions author: Thomas Laforge 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 sidebar: order: 103