Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
# run: npx nx affected --target=test --configuration=ci --parallel --base=remotes/origin/${{ inputs.base }} --head=${{ inputs.head }}

- name: E2E Test
run: npm nx run nx-angular-mf-e2e:e2e
run: npx nx run nx-angular-mf-e2e:e2e
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ Thumbs.db
.nx/workspace-data

.angular
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"nrwl.angular-console",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"firsttris.vscode-jest-runner"
"vitest.explorer"
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @klerick/nx-angular-mf

- [Readme about lib](./libs/nx-angular-mf/README.md)
- [Article about this project](https://dev.to/klerick/custom-builder-for-angular-my-way-12hd)


## Local Development
Expand Down
21 changes: 0 additions & 21 deletions apps/host-application/jest.config.ts

This file was deleted.

7 changes: 5 additions & 2 deletions apps/host-application/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"serve": {
"dependsOn": ["^build"],
"executor": "./dist/libs/nx-angular-mf:serve",
"options": {
"port": 4200
},
"configurations": {
"production": {
"buildTarget": "host-application:build:production"
Expand All @@ -88,10 +91,10 @@
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/host-application/jest.config.ts"
"command": "vitest run --config apps/host-application/vitest.config.ts"
}
},
"build-static": {
Expand Down
8 changes: 2 additions & 6 deletions apps/host-application/src/app/app.config.server.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
import { provideServerRendering } from '@angular/platform-server';
import { provideServerRoutesConfig } from '@angular/ssr';
import { provideServerRendering, withRoutes } from '@angular/ssr';
import { appConfig } from './app.config';
import { serverRoutes } from './app.routes.server';

const serverConfig: ApplicationConfig = {
providers: [
provideServerRendering(),
provideServerRoutesConfig(serverRoutes),
],
providers: [provideServerRendering(withRoutes(serverRoutes))],
};

export const config = mergeApplicationConfig(appConfig, serverConfig);
4 changes: 2 additions & 2 deletions apps/host-application/src/app/nx-welcome.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';


@Component({
selector: 'app-nx-welcome',
imports: [CommonModule],
imports: [],
template: `
<!--
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Expand Down
4 changes: 2 additions & 2 deletions apps/host-application/src/main.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { config } from './app/app.config.server';

const bootstrap = () => bootstrapApplication(AppComponent, config);
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context);

export default bootstrap;
6 changes: 0 additions & 6 deletions apps/host-application/src/test-setup.ts

This file was deleted.

15 changes: 4 additions & 11 deletions apps/host-application/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [
"node"
]
"types": ["node"],
"moduleResolution": "bundler"
},
"files": [
"src/main.ts",
"src/main.server.ts",
"src/server.ts",
"../../libs/test-shared-library/src/index.ts"
],
"include": [
"src/**/*.d.ts"
],
"exclude": [
"jest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts"
]
"include": ["src/**/*.d.ts"],
"exclude": ["vitest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion apps/host-application/tsconfig.editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"extends": "./tsconfig.json",
"include": ["src/**/*.ts"],
"compilerOptions": {},
"exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
"exclude": ["vitest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
16 changes: 0 additions & 16 deletions apps/host-application/tsconfig.spec.json

This file was deleted.

1 change: 1 addition & 0 deletions apps/mf1-application/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEPLOY_URL=http://loclahost:4201/
21 changes: 0 additions & 21 deletions apps/mf1-application/jest.config.ts

This file was deleted.

9 changes: 5 additions & 4 deletions apps/mf1-application/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"exposes": {
"FirstRemoteRoute": "/apps/mf1-application/src/app/remote/first/index.ts",
"SecondRemoteRoute": "/apps/mf1-application/src/app/remote/second/index.ts"
}
},
"deployUrlEnvName": "DEPLOY_URL"
},
"outputPath": "dist/apps/mf1-application",
"index": "apps/mf1-application/src/index.html",
Expand All @@ -40,7 +41,7 @@
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
Expand Down Expand Up @@ -84,10 +85,10 @@
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/mf1-application/jest.config.ts"
"command": "vitest run --config apps/mf1-application/vitest.config.ts"
}
},
"serve-static": {
Expand Down
4 changes: 2 additions & 2 deletions apps/mf1-application/src/app/nx-welcome.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';


@Component({
selector: 'app-nx-welcome',
imports: [CommonModule],
imports: [],
template: `
<!--
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CommonModule } from '@angular/common';

import { TestSharedLibraryComponent } from '@nx-angular-mf/test-shared-library';

@Component({
selector: 'app-first',
imports: [CommonModule, TestSharedLibraryComponent],
imports: [TestSharedLibraryComponent],
templateUrl: './first.component.html',
styleUrl: './first.component.css',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CommonModule } from '@angular/common';


@Component({
selector: 'app-second',
imports: [CommonModule],
imports: [],
templateUrl: './second.component.html',
styleUrl: './second.component.css',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
6 changes: 0 additions & 6 deletions apps/mf1-application/src/test-setup.ts

This file was deleted.

13 changes: 4 additions & 9 deletions apps/mf1-application/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": []
"types": [],
"moduleResolution": "bundler"
},
"files": [
"src/main.ts",
"src/app/remote/second/index.ts",
"../../libs/nx-angular-mf/src/loadModule.ts",
"../../libs/nx-angular-mf/src/index.ts"
],
"include": [
"src/**/*.d.ts"
],
"exclude": [
"jest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts"
]
"include": ["src/**/*.d.ts"],
"exclude": ["vitest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion apps/mf1-application/tsconfig.editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"extends": "./tsconfig.json",
"include": ["src/**/*.ts"],
"compilerOptions": {},
"exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
"exclude": ["vitest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
16 changes: 0 additions & 16 deletions apps/mf1-application/tsconfig.spec.json

This file was deleted.

1 change: 1 addition & 0 deletions apps/mf2-application/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEPLOY_URL=http://loclahost:4202/
21 changes: 0 additions & 21 deletions apps/mf2-application/jest.config.ts

This file was deleted.

7 changes: 5 additions & 2 deletions apps/mf2-application/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"serve": {
"dependsOn": ["^build"],
"executor": "./dist/libs/nx-angular-mf:serve",
"options": {
"port": 4202
},
"configurations": {
"production": {
"buildTarget": "mf2-application:build:production"
Expand All @@ -72,10 +75,10 @@
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/mf2-application/jest.config.ts"
"command": "vitest run --config apps/mf2-application/vitest.config.ts"
}
},
"serve-static": {
Expand Down
4 changes: 2 additions & 2 deletions apps/mf2-application/src/app/nx-welcome.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';


@Component({
selector: 'app-nx-welcome',
imports: [CommonModule],
imports: [],
template: `
<!--
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Expand Down
6 changes: 0 additions & 6 deletions apps/mf2-application/src/test-setup.ts

This file was deleted.

Loading