diff --git a/apps/declarative-to-reactive/.eslintrc.json b/apps/angular/decoupling/.eslintrc.json similarity index 94% rename from apps/declarative-to-reactive/.eslintrc.json rename to apps/angular/decoupling/.eslintrc.json index b428c22..bf8df14 100644 --- a/apps/declarative-to-reactive/.eslintrc.json +++ b/apps/angular/decoupling/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json"], + "extends": ["../../../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { diff --git a/apps/decoupling/README.md b/apps/angular/decoupling/README.md similarity index 68% rename from apps/decoupling/README.md rename to apps/angular/decoupling/README.md index 256c1e5..7463f1a 100644 --- a/apps/decoupling/README.md +++ b/apps/angular/decoupling/README.md @@ -5,9 +5,9 @@ ### Run Application ```bash -npx nx serve decoupling +npx nx serve angular-decoupling ``` ### Documentation and Instruction -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/33-decoupling/). +Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/33-angular-decoupling/). diff --git a/apps/decoupling/project.json b/apps/angular/decoupling/project.json similarity index 65% rename from apps/decoupling/project.json rename to apps/angular/decoupling/project.json index 6d2c8b7..9a8d728 100644 --- a/apps/decoupling/project.json +++ b/apps/angular/decoupling/project.json @@ -1,25 +1,25 @@ { - "name": "decoupling", - "$schema": "../../node_modules/nx/schemas/project-schema.json", + "name": "angular-decoupling", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "prefix": "app", - "sourceRoot": "apps/decoupling/src", + "sourceRoot": "apps/angular/decoupling/src", "tags": [], "targets": { "build": { "executor": "@angular-devkit/build-angular:browser", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/apps/decoupling", - "index": "apps/decoupling/src/index.html", - "main": "apps/decoupling/src/main.ts", + "outputPath": "dist/apps/angular/decoupling", + "index": "apps/angular/decoupling/src/index.html", + "main": "apps/angular/decoupling/src/main.ts", "polyfills": ["zone.js"], - "tsConfig": "apps/decoupling/tsconfig.app.json", + "tsConfig": "apps/angular/decoupling/tsconfig.app.json", "assets": [ - "apps/decoupling/src/favicon.ico", - "apps/decoupling/src/assets" + "apps/angular/decoupling/src/favicon.ico", + "apps/angular/decoupling/src/assets" ], - "styles": ["apps/decoupling/src/styles.scss"], + "styles": ["apps/angular/decoupling/src/styles.scss"], "scripts": [] }, "configurations": { @@ -53,10 +53,10 @@ "executor": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "decoupling:build:production" + "browserTarget": "angular-decoupling:build:production" }, "development": { - "browserTarget": "decoupling:build:development" + "browserTarget": "angular-decoupling:build:development" } }, "defaultConfiguration": "development" @@ -64,7 +64,7 @@ "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "decoupling:build" + "browserTarget": "angular-decoupling:build" } }, "lint": { @@ -72,8 +72,8 @@ "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": [ - "apps/decoupling/**/*.ts", - "apps/decoupling/**/*.html" + "apps/angular/decoupling/**/*.ts", + "apps/angular/decoupling/**/*.html" ] } } diff --git a/apps/decoupling/src/app/app.component.ts b/apps/angular/decoupling/src/app/app.component.ts similarity index 100% rename from apps/decoupling/src/app/app.component.ts rename to apps/angular/decoupling/src/app/app.component.ts diff --git a/apps/declarative-to-reactive/src/assets/.gitkeep b/apps/angular/decoupling/src/assets/.gitkeep similarity index 100% rename from apps/declarative-to-reactive/src/assets/.gitkeep rename to apps/angular/decoupling/src/assets/.gitkeep diff --git a/apps/declarative-to-reactive/src/favicon.ico b/apps/angular/decoupling/src/favicon.ico similarity index 100% rename from apps/declarative-to-reactive/src/favicon.ico rename to apps/angular/decoupling/src/favicon.ico diff --git a/apps/decoupling/src/index.html b/apps/angular/decoupling/src/index.html similarity index 100% rename from apps/decoupling/src/index.html rename to apps/angular/decoupling/src/index.html diff --git a/apps/declarative-to-reactive/src/main.ts b/apps/angular/decoupling/src/main.ts similarity index 100% rename from apps/declarative-to-reactive/src/main.ts rename to apps/angular/decoupling/src/main.ts diff --git a/apps/decoupling/src/styles.scss b/apps/angular/decoupling/src/styles.scss similarity index 100% rename from apps/decoupling/src/styles.scss rename to apps/angular/decoupling/src/styles.scss diff --git a/apps/decoupling/tailwind.config.js b/apps/angular/decoupling/tailwind.config.js similarity index 100% rename from apps/decoupling/tailwind.config.js rename to apps/angular/decoupling/tailwind.config.js diff --git a/apps/declarative-to-reactive/tsconfig.app.json b/apps/angular/decoupling/tsconfig.app.json similarity index 84% rename from apps/declarative-to-reactive/tsconfig.app.json rename to apps/angular/decoupling/tsconfig.app.json index fff4a41..5822042 100644 --- a/apps/declarative-to-reactive/tsconfig.app.json +++ b/apps/angular/decoupling/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/angular/decoupling/tsconfig.editor.json b/apps/angular/decoupling/tsconfig.editor.json new file mode 100644 index 0000000..bff9e55 --- /dev/null +++ b/apps/angular/decoupling/tsconfig.editor.json @@ -0,0 +1,11 @@ +{ + "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/decoupling/tsconfig.json b/apps/angular/decoupling/tsconfig.json similarity index 93% rename from apps/decoupling/tsconfig.json rename to apps/angular/decoupling/tsconfig.json index 0731542..51c7908 100644 --- a/apps/decoupling/tsconfig.json +++ b/apps/angular/decoupling/tsconfig.json @@ -19,7 +19,7 @@ "path": "./tsconfig.editor.json" } ], - "extends": "../../tsconfig.base.json", + "extends": "../../../tsconfig.base.json", "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, diff --git a/apps/declarative-to-reactive/README.md b/apps/declarative-to-reactive/README.md deleted file mode 100644 index 182a7a6..0000000 --- a/apps/declarative-to-reactive/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Highly Customizable CSS - -> Author: Thomas Laforge - -### Run Application - -```bash -npx nx serve declarative-to-reactive -``` - -### Documentation and Instruction - -Challenge documentation is [here](https://angular-challenges.vercel.app/challenges/angular/13-styling/). diff --git a/apps/declarative-to-reactive/jest.config.ts b/apps/declarative-to-reactive/jest.config.ts deleted file mode 100644 index 85d1335..0000000 --- a/apps/declarative-to-reactive/jest.config.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'declarative-to-reactive', - preset: '../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], - globals: {}, - coverageDirectory: '../../coverage/apps/declarative-to-reactive', - 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/declarative-to-reactive/project.json b/apps/declarative-to-reactive/project.json deleted file mode 100644 index 41085d6..0000000 --- a/apps/declarative-to-reactive/project.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "declarative-to-reactive", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "projectType": "application", - "sourceRoot": "apps/declarative-to-reactive/src", - "prefix": "app", - "targets": { - "build": { - "executor": "@angular-devkit/build-angular:browser", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/apps/declarative-to-reactive", - "index": "apps/declarative-to-reactive/src/index.html", - "main": "apps/declarative-to-reactive/src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "apps/declarative-to-reactive/tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": [ - "apps/declarative-to-reactive/src/favicon.ico", - "apps/declarative-to-reactive/src/assets" - ], - "styles": ["apps/declarative-to-reactive/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": { - "browserTarget": "declarative-to-reactive:build:production" - }, - "development": { - "browserTarget": "declarative-to-reactive:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "executor": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "declarative-to-reactive:build" - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": [ - "apps/declarative-to-reactive/**/*.ts", - "apps/declarative-to-reactive/**/*.html" - ] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "apps/declarative-to-reactive/jest.config.ts", - "passWithNoTests": true - } - } - }, - "tags": [] -} diff --git a/apps/declarative-to-reactive/src/app/app.component.ts b/apps/declarative-to-reactive/src/app/app.component.ts deleted file mode 100644 index d782ae8..0000000 --- a/apps/declarative-to-reactive/src/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NxWelcomeComponent } from './nx-welcome.component'; -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - imports: [NxWelcomeComponent], - selector: 'app-root', - template: ` `, - styles: [], -}) -export class AppComponent { - title = 'declarative-to-reactive'; -} diff --git a/apps/declarative-to-reactive/src/app/nx-welcome.component.ts b/apps/declarative-to-reactive/src/app/nx-welcome.component.ts deleted file mode 100644 index f525e85..0000000 --- a/apps/declarative-to-reactive/src/app/nx-welcome.component.ts +++ /dev/null @@ -1,801 +0,0 @@ -import { Component, ViewEncapsulation } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -/* eslint-disable */ - -@Component({ - selector: 'app-nx-welcome', - standalone: true, - imports: [CommonModule], - template: ` - - -
-
- -
-

- Hello there, - Welcome declarative-to-reactive 👋 -

-
- - -
-
-

- - - - You're up and running -

- What's next? -
-
- - - -
-
- - - - - -
-

Next steps

-

Here are some things you can do with Nx:

-
- - - - - Add UI library - -
# Generate UI lib
-nx g @nx/angular:lib ui
-
-# Add a component
-nx g @nx/angular:component button --project ui
-
-
- - - - - View interactive project graph - -
nx graph
-
-
- - - - - Run affected commands - -
# see what's been affected by changes
-nx affected:graph
-
-# run tests for current changes
-nx affected:test
-
-# run e2e tests for current changes
-nx affected:e2e
-
-
- -

- Carefully crafted with - - - -

-
-
- `, - styles: [], - encapsulation: ViewEncapsulation.None, -}) -export class NxWelcomeComponent {} diff --git a/apps/declarative-to-reactive/src/index.html b/apps/declarative-to-reactive/src/index.html deleted file mode 100644 index 8edb389..0000000 --- a/apps/declarative-to-reactive/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - DeclarativeToReactive - - - - - - - - diff --git a/apps/declarative-to-reactive/src/styles.scss b/apps/declarative-to-reactive/src/styles.scss deleted file mode 100644 index 90d4ee0..0000000 --- a/apps/declarative-to-reactive/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/declarative-to-reactive/src/test-setup.ts b/apps/declarative-to-reactive/src/test-setup.ts deleted file mode 100644 index 1100b3e..0000000 --- a/apps/declarative-to-reactive/src/test-setup.ts +++ /dev/null @@ -1 +0,0 @@ -import 'jest-preset-angular/setup-jest'; diff --git a/apps/declarative-to-reactive/tsconfig.editor.json b/apps/declarative-to-reactive/tsconfig.editor.json deleted file mode 100644 index 8ae117d..0000000 --- a/apps/declarative-to-reactive/tsconfig.editor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], - "compilerOptions": { - "types": ["jest", "node"] - } -} diff --git a/apps/declarative-to-reactive/tsconfig.json b/apps/declarative-to-reactive/tsconfig.json deleted file mode 100644 index e01cf19..0000000 --- a/apps/declarative-to-reactive/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/declarative-to-reactive/tsconfig.spec.json b/apps/declarative-to-reactive/tsconfig.spec.json deleted file mode 100644 index f6a7d97..0000000 --- a/apps/declarative-to-reactive/tsconfig.spec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "files": ["src/test-setup.ts"], - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/apps/decoupling/.eslintrc.json b/apps/decoupling/.eslintrc.json deleted file mode 100644 index b428c22..0000000 --- a/apps/decoupling/.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/decoupling/src/assets/.gitkeep b/apps/decoupling/src/assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/decoupling/src/favicon.ico b/apps/decoupling/src/favicon.ico deleted file mode 100644 index 317ebcb..0000000 Binary files a/apps/decoupling/src/favicon.ico and /dev/null differ diff --git a/apps/decoupling/src/main.ts b/apps/decoupling/src/main.ts deleted file mode 100644 index 31c5da4..0000000 --- a/apps/decoupling/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/decoupling/tsconfig.app.json b/apps/decoupling/tsconfig.app.json deleted file mode 100644 index fff4a41..0000000 --- a/apps/decoupling/tsconfig.app.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "types": [] - }, - "files": ["src/main.ts"], - "include": ["src/**/*.d.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"] -} diff --git a/apps/decoupling/tsconfig.editor.json b/apps/decoupling/tsconfig.editor.json deleted file mode 100644 index 78ac03d..0000000 --- a/apps/decoupling/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": [] - } -}