Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoslig committed Sep 8, 2024
1 parent f0d00d8 commit 078062d
Show file tree
Hide file tree
Showing 91 changed files with 92 additions and 105 deletions.
Empty file.
2 changes: 1 addition & 1 deletion apps/conduit/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cdt-navbar [isLoggedIn]="$isLoggedIn()" [user]="$user()"></cdt-navbar>
<cdt-navbar [isLoggedIn]="authStore.loggedIn()" [user]="authStore.user()"></cdt-navbar>
<router-outlet></router-outlet>

@defer (on idle) {
Expand Down
6 changes: 1 addition & 5 deletions apps/conduit/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ import { NavbarComponent } from './layout/navbar/navbar.component';
selector: 'cdt-root',
standalone: true,
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
imports: [FooterComponent, NavbarComponent, RouterModule, AsyncPipe],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements OnInit {
private readonly localStorageJwtService = inject(LocalStorageJwtService);
private readonly authStore = inject(AuthStore);

$user = this.authStore.user;
$isLoggedIn = this.authStore.loggedIn;
protected readonly authStore = inject(AuthStore);

ngOnInit() {
this.localStorageJwtService
Expand Down
2 changes: 1 addition & 1 deletion apps/conduit/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const appConfig: ApplicationConfig = {
},
{
path: 'home',
loadComponent: () => import('@realworld/home/src/lib/home.component').then((m) => m.HomeComponent),
loadComponent: () => import('@realworld/home/feature-home').then((m) => m.HomeComponent),
},
{
path: 'login',
Expand Down
4 changes: 2 additions & 2 deletions apps/conduit/src/app/layout/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { User } from '@realworld/core/api-types';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NavbarComponent {
user = input.required<User>();
isLoggedIn = input.required<boolean>();
protected readonly user = input.required<User>();
protected readonly isLoggedIn = input.required<boolean>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { tapResponse } from '@ngrx/operators';
import { ActionsService } from './services/actions.service';
import { Router } from '@angular/router';
import { NewArticle } from '@realworld/core/api-types';
import { FormErrorsStore } from '../../../../core/forms/src/lib/forms-errors.store';
import { FormErrorsStore } from '@realworld/core/forms';

export const ArticleStore = signalStore(
{ providedIn: 'root' },
Expand Down
10 changes: 5 additions & 5 deletions libs/articles/data-access/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './lib/services/actions.service';
export * from './lib/models/comment.model';
export * from './lib/models/articles-list.model';
export { ArticleStore } from './lib/article.store';
export { ArticlesListStore } from './lib/articles-list.store';
export * from './services/actions.service';
export * from './models/comment.model';
export * from './models/articles-list.model';
export { ArticleStore } from './article.store';
export { ArticlesListStore } from './articles-list.store';
4 changes: 2 additions & 2 deletions libs/articles/feature-article-edit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './lib/article-edit.component';
export * from './lib/article-edit.routes';
export * from './article-edit.component';
export * from './article-edit.routes';
4 changes: 2 additions & 2 deletions libs/articles/feature-article/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './lib/article.component';
export * from './lib/article.routes';
export * from './article.component';
export * from './article.routes';
2 changes: 1 addition & 1 deletion libs/articles/feature-articles-list/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './lib/article-list.component';
export * from './article-list.component';
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions libs/auth/data-access/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './lib/services/token-interceptor.service';
export * from './lib/services/local-storage-jwt.service';
export * from './lib/services/auth-guard';
export * from './services/token-interceptor.service';
export * from './services/local-storage-jwt.service';
export * from './services/auth-guard';

export { AuthStore } from './lib/auth.store';
export { AuthStore } from './auth.store';
4 changes: 2 additions & 2 deletions libs/auth/feature-auth/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './lib/login/login.component';
export * from './lib/register/register.component';
export * from './login/login.component';
export * from './register/register.component';
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"extends": ["../../.eslintrc.json"],
"extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["libs/home/tsconfig.*?.json"]
},
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
Expand Down
24 changes: 24 additions & 0 deletions libs/home/feature-home/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* eslint-disable */
export default {
displayName: 'home-feature-home',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {},
coverageDirectory: '../../../coverage/libs/home/feature-home',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/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',
],
preset: '../../../jest.preset.js',
};
21 changes: 21 additions & 0 deletions libs/home/feature-home/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "home-feature-home",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/home/feature-home/src",
"prefix": "cdt",
"targets": {
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/home/feature-home"],
"options": {
"jestConfig": "libs/home/feature-home/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nx/eslint:lint"
}
},
"tags": []
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions libs/home/feature-home/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './home.component';
1 change: 1 addition & 0 deletions libs/home/feature-home/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'jest-preset-angular/setup-jest';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
Expand Down
12 changes: 12 additions & 0 deletions libs/home/feature-home/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"outDir": "../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"],
"target": "es2016"
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
19 changes: 0 additions & 19 deletions libs/home/jest.config.ts

This file was deleted.

17 changes: 0 additions & 17 deletions libs/home/project.json

This file was deleted.

9 changes: 0 additions & 9 deletions libs/home/src/test-setup.ts

This file was deleted.

22 changes: 0 additions & 22 deletions libs/home/tsconfig.lib.json

This file was deleted.

4 changes: 2 additions & 2 deletions libs/profile/feature-profile/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './lib/profile.component';
export * from './lib/profile.routes';
export * from './profile.component';
export * from './profile.routes';
2 changes: 1 addition & 1 deletion libs/settings/feature-settings/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './lib/settings.component';
export * from './settings.component';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "conduit",
"version": "17.2.2",
"version": "18.0.0",
"license": "MIT",
"scripts": {
"ng": "nx",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"@realworld/profile/feature-profile": ["libs/profile/feature-profile/src/index.ts"],
"@realworld/settings/data-access": ["libs/settings/data-access/src/index.ts"],
"@realworld/settings/feature-settings": ["libs/settings/feature-settings/src/index.ts"],
"@realworld/ui/components": ["libs/ui/components/src/index.ts"]
"@realworld/ui/components": ["libs/ui/components/src/index.ts"],
"@realworld/home/feature-home": ["libs/home/feature-home/src/index.ts"]
},
"strict": true
},
Expand Down

0 comments on commit 078062d

Please sign in to comment.