mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
chore(version): update to version 16
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
"ignorePatterns": ["**/*"],
|
"ignorePatterns": ["**/*"],
|
||||||
"plugins": ["@nrwl/nx"],
|
"plugins": ["@nx"],
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@nrwl/nx/enforce-module-boundaries": [
|
"@nx/enforce-module-boundaries": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"enforceBuildableLibDependency": true,
|
"enforceBuildableLibDependency": true,
|
||||||
@@ -19,17 +19,20 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@angular-eslint/no-host-metadata-property": ["error", { "allowStatic": true }]
|
"@angular-eslint/no-host-metadata-property": [
|
||||||
|
"error",
|
||||||
|
{ "allowStatic": true }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.ts", "*.tsx"],
|
"files": ["*.ts", "*.tsx"],
|
||||||
"extends": ["plugin:@nrwl/nx/typescript"],
|
"extends": ["plugin:@nx/typescript"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.js", "*.jsx"],
|
"files": ["*.js", "*.jsx"],
|
||||||
"extends": ["plugin:@nrwl/nx/javascript"],
|
"extends": ["plugin:@nx/javascript"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/anchor-scrolling/jest.config.ts",
|
"jestConfig": "apps/anchor-scrolling/jest.config.ts",
|
||||||
|
|||||||
6
apps/anchor-scrolling/src/app/app.config.ts
Normal file
6
apps/anchor-scrolling/src/app/app.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideRouter } from '@angular/router';
|
||||||
|
import { appRoutes } from './app.routes';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [provideRouter(appRoutes)],
|
||||||
|
};
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
import { appConfig } from './app/app.config';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideRouter } from '@angular/router';
|
|
||||||
import { AppComponent } from './app/app.component';
|
|
||||||
import { appRoutes } from './app/app.routes';
|
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
import { AppComponent } from './app/app.component';
|
||||||
providers: [provideRouter(appRoutes)],
|
|
||||||
}).catch((err) => console.error(err));
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
|
console.error(err)
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": [
|
"outputs": ["{options.outputPath}"],
|
||||||
"{options.outputPath}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/context-outlet-type",
|
"outputPath": "dist/apps/context-outlet-type",
|
||||||
"index": "apps/context-outlet-type/src/index.html",
|
"index": "apps/context-outlet-type/src/index.html",
|
||||||
@@ -21,9 +19,7 @@
|
|||||||
"apps/context-outlet-type/src/favicon.ico",
|
"apps/context-outlet-type/src/favicon.ico",
|
||||||
"apps/context-outlet-type/src/assets"
|
"apps/context-outlet-type/src/assets"
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": ["apps/context-outlet-type/src/styles.scss"],
|
||||||
"apps/context-outlet-type/src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -78,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/context-outlet-type/**/*.ts",
|
"apps/context-outlet-type/**/*.ts",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -75,13 +75,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["apps/crud/**/*.ts", "apps/crud/**/*.html"]
|
"lintFilePatterns": ["apps/crud/**/*.ts", "apps/crud/**/*.html"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/crud/jest.config.ts",
|
"jestConfig": "apps/crud/jest.config.ts",
|
||||||
|
|||||||
6
apps/crud/src/app/app.config.ts
Normal file
6
apps/crud/src/app/app.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { enableProdMode, importProvidersFrom } from '@angular/core';
|
||||||
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [importProvidersFrom(HttpClientModule)],
|
||||||
|
};
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { HttpClientModule } from '@angular/common/http';
|
import { appConfig } from './app/app.config';
|
||||||
import { enableProdMode, importProvidersFrom } from '@angular/core';
|
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
import { environment } from './environments/environment';
|
import { environment } from './environments/environment';
|
||||||
@@ -8,6 +8,6 @@ if (environment.production) {
|
|||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
providers: [importProvidersFrom(HttpClientModule)],
|
console.error(err)
|
||||||
}).catch((err) => console.error(err));
|
);
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/declarative-to-reactive/jest.config.ts",
|
"jestConfig": "apps/declarative-to-reactive/jest.config.ts",
|
||||||
|
|||||||
@@ -730,10 +730,10 @@ import { CommonModule } from '@angular/common';
|
|||||||
Add UI library
|
Add UI library
|
||||||
</summary>
|
</summary>
|
||||||
<pre><span># Generate UI lib</span>
|
<pre><span># Generate UI lib</span>
|
||||||
nx g @nrwl/angular:lib ui
|
nx g @nx/angular:lib ui
|
||||||
|
|
||||||
<span># Add a component</span>
|
<span># Add a component</span>
|
||||||
nx g @nrwl/angular:component button --project ui</pre>
|
nx g @nx/angular:component button --project ui</pre>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["apps/di/**/*.ts", "apps/di/**/*.html"]
|
"lintFilePatterns": ["apps/di/**/*.ts", "apps/di/**/*.html"]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": [
|
"outputs": ["{options.outputPath}"],
|
||||||
"{options.outputPath}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/ngfor-enhancement",
|
"outputPath": "dist/apps/ngfor-enhancement",
|
||||||
"index": "apps/ngfor-enhancement/src/index.html",
|
"index": "apps/ngfor-enhancement/src/index.html",
|
||||||
@@ -21,9 +19,7 @@
|
|||||||
"apps/ngfor-enhancement/src/favicon.ico",
|
"apps/ngfor-enhancement/src/favicon.ico",
|
||||||
"apps/ngfor-enhancement/src/assets"
|
"apps/ngfor-enhancement/src/assets"
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": ["apps/ngfor-enhancement/src/styles.scss"],
|
||||||
"apps/ngfor-enhancement/src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -78,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/ngfor-enhancement/**/*.ts",
|
"apps/ngfor-enhancement/**/*.ts",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": [
|
"outputs": ["{options.outputPath}"],
|
||||||
"{options.outputPath}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/ngrx-1",
|
"outputPath": "dist/apps/ngrx-1",
|
||||||
"index": "apps/ngrx-1/src/index.html",
|
"index": "apps/ngrx-1/src/index.html",
|
||||||
@@ -17,17 +15,10 @@
|
|||||||
"polyfills": "apps/ngrx-1/src/polyfills.ts",
|
"polyfills": "apps/ngrx-1/src/polyfills.ts",
|
||||||
"tsConfig": "apps/ngrx-1/tsconfig.app.json",
|
"tsConfig": "apps/ngrx-1/tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": [
|
"assets": ["apps/ngrx-1/src/favicon.ico", "apps/ngrx-1/src/assets"],
|
||||||
"apps/ngrx-1/src/favicon.ico",
|
"styles": ["apps/ngrx-1/src/styles.scss"],
|
||||||
"apps/ngrx-1/src/assets"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"apps/ngrx-1/src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"allowedCommonJsDependencies": [
|
"allowedCommonJsDependencies": ["seedrandom"]
|
||||||
"seedrandom"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@@ -81,19 +72,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": ["apps/ngrx-1/**/*.ts", "apps/ngrx-1/**/*.html"]
|
||||||
"apps/ngrx-1/**/*.ts",
|
|
||||||
"apps/ngrx-1/**/*.html"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": [
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"{workspaceRoot}/coverage/{projectRoot}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/ngrx-1/jest.config.ts",
|
"jestConfig": "apps/ngrx-1/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
|
|||||||
12
apps/ngrx-1/src/app/app.config.ts
Normal file
12
apps/ngrx-1/src/app/app.config.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideStore } from '@ngrx/store';
|
||||||
|
import { provideEffects } from '@ngrx/effects';
|
||||||
|
import { ActivityEffects } from './store/activity/activity.effects';
|
||||||
|
import { UserEffects } from './store/user/user.effects';
|
||||||
|
import { StatusEffects } from './store/status/status.effects';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [
|
||||||
|
provideStore(reducers),
|
||||||
|
provideEffects([ActivityEffects, UserEffects, StatusEffects]),
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
|
import { appConfig } from './app/app.config';
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideEffects } from '@ngrx/effects';
|
|
||||||
import { provideStore } from '@ngrx/store';
|
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
import { ActivityEffects } from './app/store/activity/activity.effects';
|
|
||||||
import {
|
import {
|
||||||
activityFeatureKey,
|
activityFeatureKey,
|
||||||
activityReducer,
|
activityReducer,
|
||||||
} from './app/store/activity/activity.reducer';
|
} from './app/store/activity/activity.reducer';
|
||||||
import { StatusEffects } from './app/store/status/status.effects';
|
|
||||||
import {
|
import {
|
||||||
statusFeatureKey,
|
statusFeatureKey,
|
||||||
statusReducer,
|
statusReducer,
|
||||||
} from './app/store/status/status.reducer';
|
} from './app/store/status/status.reducer';
|
||||||
import { UserEffects } from './app/store/user/user.effects';
|
|
||||||
import { userFeatureKey, userReducer } from './app/store/user/user.reducer';
|
import { userFeatureKey, userReducer } from './app/store/user/user.reducer';
|
||||||
import { environment } from './environments/environment';
|
import { environment } from './environments/environment';
|
||||||
|
|
||||||
@@ -27,9 +27,4 @@ const reducers = {
|
|||||||
[userFeatureKey]: userReducer,
|
[userFeatureKey]: userReducer,
|
||||||
};
|
};
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig);
|
||||||
providers: [
|
|
||||||
provideStore(reducers),
|
|
||||||
provideEffects([ActivityEffects, UserEffects, StatusEffects]),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/ngrx-notification/**/*.ts",
|
"apps/ngrx-notification/**/*.ts",
|
||||||
|
|||||||
33
apps/ngrx-notification/src/app/app.config.ts
Normal file
33
apps/ngrx-notification/src/app/app.config.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideStore } from '@ngrx/store';
|
||||||
|
import { provideEffects } from '@ngrx/effects';
|
||||||
|
import { TeacherEffects } from './teacher/store/teacher.effects';
|
||||||
|
import { StudentEffects } from './student/store/student.effects';
|
||||||
|
import { provideRouter } from '@angular/router';
|
||||||
|
import { ROUTES } from './routes';
|
||||||
|
import { APP_INITIALIZER, enableProdMode, inject } from '@angular/core';
|
||||||
|
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend';
|
||||||
|
import { NotificationService } from './data-access/notification.service';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [
|
||||||
|
provideStore(REDUCERS),
|
||||||
|
provideEffects([TeacherEffects, StudentEffects]),
|
||||||
|
provideRouter(ROUTES),
|
||||||
|
{
|
||||||
|
provide: APP_INITIALIZER,
|
||||||
|
multi: true,
|
||||||
|
useFactory: () => {
|
||||||
|
const service = inject(FakeBackendService);
|
||||||
|
return () => service.start();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: APP_INITIALIZER,
|
||||||
|
multi: true,
|
||||||
|
useFactory: () => {
|
||||||
|
const service = inject(NotificationService);
|
||||||
|
return () => service.init();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend';
|
import { appConfig } from './app/app.config';
|
||||||
import { APP_INITIALIZER, enableProdMode, inject } from '@angular/core';
|
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideRouter } from '@angular/router';
|
|
||||||
import { provideEffects } from '@ngrx/effects';
|
|
||||||
import { provideStore } from '@ngrx/store';
|
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
import { NotificationService } from './app/data-access/notification.service';
|
|
||||||
import { ROUTES } from './app/routes';
|
|
||||||
import { StudentEffects } from './app/student/store/student.effects';
|
|
||||||
import {
|
import {
|
||||||
studentReducer,
|
studentReducer,
|
||||||
studentsFeatureKey,
|
studentsFeatureKey,
|
||||||
} from './app/student/store/student.reducer';
|
} from './app/student/store/student.reducer';
|
||||||
import { TeacherEffects } from './app/teacher/store/teacher.effects';
|
|
||||||
import {
|
import {
|
||||||
teacherReducer,
|
teacherReducer,
|
||||||
teachersFeatureKey,
|
teachersFeatureKey,
|
||||||
@@ -28,26 +24,6 @@ const REDUCERS = {
|
|||||||
[studentsFeatureKey]: studentReducer,
|
[studentsFeatureKey]: studentReducer,
|
||||||
};
|
};
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
providers: [
|
console.error(err)
|
||||||
provideStore(REDUCERS),
|
);
|
||||||
provideEffects([TeacherEffects, StudentEffects]),
|
|
||||||
provideRouter(ROUTES),
|
|
||||||
{
|
|
||||||
provide: APP_INITIALIZER,
|
|
||||||
multi: true,
|
|
||||||
useFactory: () => {
|
|
||||||
const service = inject(FakeBackendService);
|
|
||||||
return () => service.start();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provide: APP_INITIALIZER,
|
|
||||||
multi: true,
|
|
||||||
useFactory: () => {
|
|
||||||
const service = inject(NotificationService);
|
|
||||||
return () => service.init();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}).catch((err) => console.error(err));
|
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["apps/overload/**/*.ts", "apps/overload/**/*.html"]
|
"lintFilePatterns": ["apps/overload/**/*.ts", "apps/overload/**/*.html"]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/permissions/**/*.ts",
|
"apps/permissions/**/*.ts",
|
||||||
|
|||||||
6
apps/permissions/src/app/app.config.ts
Normal file
6
apps/permissions/src/app/app.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideRouter } from '@angular/router';
|
||||||
|
import { APP_ROUTES } from './routes';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [provideRouter(APP_ROUTES)],
|
||||||
|
};
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
|
import { appConfig } from './app/app.config';
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideRouter } from '@angular/router';
|
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
import { APP_ROUTES } from './app/routes';
|
|
||||||
import { environment } from './environments/environment';
|
import { environment } from './environments/environment';
|
||||||
|
|
||||||
if (environment.production) {
|
if (environment.production) {
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
providers: [provideRouter(APP_ROUTES)],
|
console.error(err)
|
||||||
}).catch((err) => console.error(err));
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/pipe-easy/**/*.ts",
|
"apps/pipe-easy/**/*.ts",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/pipe-hard/**/*.ts",
|
"apps/pipe-hard/**/*.ts",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/pipe-intermediate/**/*.ts",
|
"apps/pipe-intermediate/**/*.ts",
|
||||||
|
|||||||
@@ -1,29 +1,19 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": ["../../.eslintrc.json"],
|
||||||
"../../.eslintrc.json"
|
"ignorePatterns": ["!**/*"],
|
||||||
],
|
|
||||||
"ignorePatterns": [
|
|
||||||
"!**/*"
|
|
||||||
],
|
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["*.ts"],
|
||||||
"*.ts"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["*.html"],
|
||||||
"*.html"
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
],
|
|
||||||
"extends": [
|
|
||||||
"plugin:@nrwl/nx/angular-template"
|
|
||||||
],
|
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": [
|
"outputs": ["{options.outputPath}"],
|
||||||
"{options.outputPath}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/projection",
|
"outputPath": "dist/apps/projection",
|
||||||
"index": "apps/projection/src/index.html",
|
"index": "apps/projection/src/index.html",
|
||||||
@@ -21,13 +19,9 @@
|
|||||||
"apps/projection/src/favicon.ico",
|
"apps/projection/src/favicon.ico",
|
||||||
"apps/projection/src/assets"
|
"apps/projection/src/assets"
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": ["apps/projection/src/styles.scss"],
|
||||||
"apps/projection/src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"allowedCommonJsDependencies": [
|
"allowedCommonJsDependencies": ["seedrandom"]
|
||||||
"seedrandom"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@@ -81,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/projection/**/*.ts",
|
"apps/projection/**/*.ts",
|
||||||
@@ -90,10 +84,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": [
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"{workspaceRoot}/coverage/{projectRoot}"
|
|
||||||
],
|
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/projection/jest.config.ts",
|
"jestConfig": "apps/projection/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/rxjs-pipe-bug/**/*.ts",
|
"apps/rxjs-pipe-bug/**/*.ts",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../../dist/out-tsc",
|
"outDir": "../../../dist/out-tsc",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"types": ["cypress", "node"]
|
"types": ["cypress", "node"],
|
||||||
|
"sourceMap": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"support/**/*.ts",
|
"support/**/*.ts",
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/rxjs-race-condition/jest.config.ts",
|
"jestConfig": "apps/rxjs-race-condition/jest.config.ts",
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/rxjs-race-condition/cypress.config.ts",
|
"cypressConfig": "apps/rxjs-race-condition/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
6
apps/rxjs-race-condition/src/app/app.config.ts
Normal file
6
apps/rxjs-race-condition/src/app/app.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { importProvidersFrom } from '@angular/core';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [importProvidersFrom(MatDialogModule)],
|
||||||
|
};
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { importProvidersFrom } from '@angular/core';
|
import { appConfig } from './app/app.config';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
providers: [importProvidersFrom(MatDialogModule)],
|
console.error(err)
|
||||||
}).catch((err) => console.error(err));
|
);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/scroll-cd/jest.config.ts",
|
"jestConfig": "apps/scroll-cd/jest.config.ts",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["apps/styling/**/*.ts", "apps/styling/**/*.html"]
|
"lintFilePatterns": ["apps/styling/**/*.ts", "apps/styling/**/*.html"]
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../../dist/out-tsc",
|
"outDir": "../../../dist/out-tsc",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"types": ["cypress", "node"]
|
"types": ["cypress", "node"],
|
||||||
|
"sourceMap": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"support/**/*.ts",
|
"support/**/*.ts",
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-forms/jest.config.ts",
|
"jestConfig": "apps/testing-forms/jest.config.ts",
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-forms/cypress.config.ts",
|
"cypressConfig": "apps/testing-forms/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
@@ -730,10 +730,10 @@ import { CommonModule } from '@angular/common';
|
|||||||
Add UI library
|
Add UI library
|
||||||
</summary>
|
</summary>
|
||||||
<pre><span># Generate UI lib</span>
|
<pre><span># Generate UI lib</span>
|
||||||
nx g @nrwl/angular:lib ui
|
nx g @nx/angular:lib ui
|
||||||
|
|
||||||
<span># Add a component</span>
|
<span># Add a component</span>
|
||||||
nx g @nrwl/angular:component button --project ui</pre>
|
nx g @nx/angular:component button --project ui</pre>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../../dist/out-tsc",
|
"outDir": "../../../dist/out-tsc",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"types": ["cypress", "node"]
|
"types": ["cypress", "node"],
|
||||||
|
"sourceMap": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"support/**/*.ts",
|
"support/**/*.ts",
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-input-output/jest.config.ts",
|
"jestConfig": "apps/testing-input-output/jest.config.ts",
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-input-output/cypress.config.ts",
|
"cypressConfig": "apps/testing-input-output/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { LetModule } from '@ngrx/component';
|
import { LetDirective } from '@ngrx/component';
|
||||||
import { ComponentStore } from '@ngrx/component-store';
|
import { ComponentStore } from '@ngrx/component-store';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-counter',
|
selector: 'app-counter',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [AsyncPipe, LetModule],
|
imports: [AsyncPipe, LetDirective],
|
||||||
template: `
|
template: `
|
||||||
<ng-container *ngrxLet="counter$ as counter">
|
<ng-container *ngrxLet="counter$ as counter">
|
||||||
<p data-testid="counter">Counter: {{ counter }}</p>
|
<p data-testid="counter">Counter: {{ counter }}</p>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../../dist/out-tsc",
|
"outDir": "../../../dist/out-tsc",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"types": ["cypress", "node"]
|
"types": ["cypress", "node"],
|
||||||
|
"sourceMap": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"support/**/*.ts",
|
"support/**/*.ts",
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-modal/jest.config.ts",
|
"jestConfig": "apps/testing-modal/jest.config.ts",
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-modal/cypress.config.ts",
|
"cypressConfig": "apps/testing-modal/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
5
apps/testing-modal/src/app/app.config.ts
Normal file
5
apps/testing-modal/src/app/app.config.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [provideAnimations()],
|
||||||
|
};
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
|
import { appConfig } from './app/app.config';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
||||||
import { AppComponent } from './app/app.component';
|
import { AppComponent } from './app/app.component';
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
providers: [provideAnimations()],
|
console.error(err)
|
||||||
}).catch((err) => console.error(err));
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"rules": {},
|
"rules": {},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["cypress", "node"]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"support/**/*.ts",
|
|
||||||
"../cypress.config.ts",
|
|
||||||
"../**/*.cy.ts",
|
|
||||||
"../**/*.cy.tsx",
|
|
||||||
"../**/*.cy.js",
|
|
||||||
"../**/*.cy.jsx",
|
|
||||||
"../**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
18
apps/testing-nested/cypress/tsconfig.json
Normal file
18
apps/testing-nested/cypress/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-nested/jest.config.ts",
|
"jestConfig": "apps/testing-nested/jest.config.ts",
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-nested/cypress.config.ts",
|
"cypressConfig": "apps/testing-nested/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["cypress", "node"]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"support/**/*.ts",
|
|
||||||
"../cypress.config.ts",
|
|
||||||
"../**/*.cy.ts",
|
|
||||||
"../**/*.cy.tsx",
|
|
||||||
"../**/*.cy.js",
|
|
||||||
"../**/*.cy.jsx",
|
|
||||||
"../**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
18
apps/testing-router-outlet/cypress/tsconfig.json
Normal file
18
apps/testing-router-outlet/cypress/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-router-outlet/jest.config.ts",
|
"jestConfig": "apps/testing-router-outlet/jest.config.ts",
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-router-outlet/cypress.config.ts",
|
"cypressConfig": "apps/testing-router-outlet/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
6
apps/testing-router-outlet/src/app/app.config.ts
Normal file
6
apps/testing-router-outlet/src/app/app.config.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { ApplicationConfig } from '@angular/core';
|
||||||
|
import { provideRouter } from '@angular/router';
|
||||||
|
import { appRoutes } from './app.routes';
|
||||||
|
export const appConfig: ApplicationConfig = {
|
||||||
|
providers: [provideRouter(appRoutes)],
|
||||||
|
};
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
import { appConfig } from './app/app.config';
|
||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
import { provideRouter } from '@angular/router';
|
|
||||||
import { AppComponent } from './app/app.component';
|
|
||||||
import { appRoutes } from './app/app.routes';
|
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
import { AppComponent } from './app/app.component';
|
||||||
providers: [provideRouter(appRoutes)],
|
|
||||||
}).catch((err) => console.error(err));
|
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||||
|
console.error(err)
|
||||||
|
);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
import { nxComponentTestingPreset } from '@nrwl/angular/plugins/component-testing';
|
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
component: nxComponentTestingPreset(__filename),
|
component: nxComponentTestingPreset(__filename),
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["cypress", "node"]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"support/**/*.ts",
|
|
||||||
"../cypress.config.ts",
|
|
||||||
"../**/*.cy.ts",
|
|
||||||
"../**/*.cy.tsx",
|
|
||||||
"../**/*.cy.js",
|
|
||||||
"../**/*.cy.jsx",
|
|
||||||
"../**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
18
apps/testing-table/cypress/tsconfig.json
Normal file
18
apps/testing-table/cypress/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/linter:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nrwl/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/testing-table/jest.config.ts",
|
"jestConfig": "apps/testing-table/jest.config.ts",
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nrwl/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/testing-table/cypress.config.ts",
|
"cypressConfig": "apps/testing-table/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
|
|||||||
@@ -730,10 +730,10 @@ import { CommonModule } from '@angular/common';
|
|||||||
Add UI library
|
Add UI library
|
||||||
</summary>
|
</summary>
|
||||||
<pre><span># Generate UI lib</span>
|
<pre><span># Generate UI lib</span>
|
||||||
nx g @nrwl/angular:lib ui
|
nx g @nx/angular:lib ui
|
||||||
|
|
||||||
<span># Add a component</span>
|
<span># Add a component</span>
|
||||||
nx g @nrwl/angular:component button --project ui</pre>
|
nx g @nx/angular:component button --project ui</pre>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { createGlobPatternsForDependencies } = require('@nrwl/angular/tailwind');
|
const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
|
||||||
const { join } = require('path');
|
const { join } = require('path');
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"path": "./tsconfig.editor.json"
|
"path": "./tsconfig.editor.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./cypress/tsconfig.cy.json"
|
"path": "./cypress/tsconfig.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular",
|
"plugin:@nx/angular",
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nx/angular-template"],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user