Nx migration
@@ -1,13 +1,9 @@
|
|||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
"ignorePatterns": [
|
"ignorePatterns": ["**/*"],
|
||||||
"projects/**/*"
|
|
||||||
],
|
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["*.ts"],
|
||||||
"*.ts"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
@@ -34,14 +30,31 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["*.html"],
|
||||||
"*.html"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@angular-eslint/template/recommended",
|
"plugin:@angular-eslint/template/recommended",
|
||||||
"plugin:@angular-eslint/template/accessibility"
|
"plugin:@angular-eslint/template/accessibility"
|
||||||
],
|
],
|
||||||
"rules": {}
|
"rules": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||||
|
"rules": {
|
||||||
|
"@nx/enforce-module-boundaries": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"enforceBuildableLibDependency": true,
|
||||||
|
"allow": [],
|
||||||
|
"depConstraints": [
|
||||||
|
{
|
||||||
|
"sourceTag": "*",
|
||||||
|
"onlyDependOnLibsWithTags": ["*"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plugins": ["@nx"]
|
||||||
}
|
}
|
||||||
|
|||||||
7
.gitignore
vendored
@@ -40,3 +40,10 @@ testem.log
|
|||||||
# System files
|
# System files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
|
||||||
|
.nx/cache
|
||||||
|
|
||||||
|
# env
|
||||||
|
*.env*
|
||||||
|
!*.env.example
|
||||||
|
|||||||
4
.prettierignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Add files here to ignore them from prettier formatting
|
||||||
|
/dist
|
||||||
|
/coverage
|
||||||
|
/.nx/cache
|
||||||
8
.vscode/extensions.json
vendored
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
|
"recommendations": [
|
||||||
"recommendations": ["angular.ng-template"]
|
"angular.ng-template",
|
||||||
|
"nrwl.angular-console",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"esbenp.prettier-vscode"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
2
.vscode/settings.json
vendored
@@ -7,6 +7,6 @@
|
|||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"**/Thumbs.db": true,
|
"**/Thumbs.db": true,
|
||||||
"**/node_modules": true,
|
"**/node_modules": true,
|
||||||
"**/.angular": true,
|
"**/.angular": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
116
angular.json
@@ -1,116 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
||||||
"version": 1,
|
|
||||||
"cli": {
|
|
||||||
"packageManager": "pnpm",
|
|
||||||
"schematicCollections": [
|
|
||||||
"@angular-eslint/schematics"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"newProjectRoot": "projects",
|
|
||||||
"projects": {
|
|
||||||
"NwaifuWeb": {
|
|
||||||
"projectType": "application",
|
|
||||||
"schematics": {
|
|
||||||
"@schematics/angular:component": {
|
|
||||||
"style": "less"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "",
|
|
||||||
"sourceRoot": "src",
|
|
||||||
"prefix": "app",
|
|
||||||
"architect": {
|
|
||||||
"build": {
|
|
||||||
"builder": "@angular-devkit/build-angular:application",
|
|
||||||
"options": {
|
|
||||||
"outputPath": "dist/nwaifu-web",
|
|
||||||
"index": "src/index.html",
|
|
||||||
"browser": "src/main.ts",
|
|
||||||
"polyfills": [
|
|
||||||
"zone.js"
|
|
||||||
],
|
|
||||||
"tsConfig": "tsconfig.app.json",
|
|
||||||
"inlineStyleLanguage": "less",
|
|
||||||
"assets": [
|
|
||||||
"src/favicon.ico",
|
|
||||||
"src/assets"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"src/styles.less"
|
|
||||||
],
|
|
||||||
"scripts": []
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"budgets": [
|
|
||||||
{
|
|
||||||
"type": "initial",
|
|
||||||
"maximumWarning": "500kb",
|
|
||||||
"maximumError": "1mb"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "anyComponentStyle",
|
|
||||||
"maximumWarning": "2kb",
|
|
||||||
"maximumError": "4kb"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputHashing": "all"
|
|
||||||
},
|
|
||||||
"development": {
|
|
||||||
"optimization": false,
|
|
||||||
"extractLicenses": false,
|
|
||||||
"sourceMap": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultConfiguration": "production"
|
|
||||||
},
|
|
||||||
"serve": {
|
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"buildTarget": "NwaifuWeb:build:production"
|
|
||||||
},
|
|
||||||
"development": {
|
|
||||||
"buildTarget": "NwaifuWeb:build:development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultConfiguration": "development"
|
|
||||||
},
|
|
||||||
"extract-i18n": {
|
|
||||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
||||||
"options": {
|
|
||||||
"buildTarget": "NwaifuWeb:build"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
|
||||||
"options": {
|
|
||||||
"polyfills": [
|
|
||||||
"zone.js",
|
|
||||||
"zone.js/testing"
|
|
||||||
],
|
|
||||||
"tsConfig": "tsconfig.spec.json",
|
|
||||||
"inlineStyleLanguage": "less",
|
|
||||||
"assets": [
|
|
||||||
"src/favicon.ico",
|
|
||||||
"src/assets"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"src/styles.less"
|
|
||||||
],
|
|
||||||
"scripts": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-eslint/builder:lint",
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.html"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
41
apps/NwaifuWeb/.eslintrc.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"ignorePatterns": ["!**/*"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["*.ts"],
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:@angular-eslint/recommended",
|
||||||
|
"plugin:@angular-eslint/template/process-inline-templates"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"@angular-eslint/directive-selector": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"type": "attribute",
|
||||||
|
"prefix": "app",
|
||||||
|
"style": "camelCase"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@angular-eslint/component-selector": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"type": "element",
|
||||||
|
"prefix": "app",
|
||||||
|
"style": "kebab-case"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.html"],
|
||||||
|
"extends": [
|
||||||
|
"plugin:@angular-eslint/template/recommended",
|
||||||
|
"plugin:@angular-eslint/template/accessibility"
|
||||||
|
],
|
||||||
|
"rules": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extends": "../../.eslintrc.json"
|
||||||
|
}
|
||||||
86
apps/NwaifuWeb/project.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"name": "NwaifuWeb",
|
||||||
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
|
"projectType": "application",
|
||||||
|
"generators": {
|
||||||
|
"@schematics/angular:component": {
|
||||||
|
"style": "less"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRoot": "apps/NwaifuWeb/src",
|
||||||
|
"prefix": "app",
|
||||||
|
"targets": {
|
||||||
|
"build": {
|
||||||
|
"executor": "@angular-devkit/build-angular:application",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist/apps/NwaifuWeb",
|
||||||
|
"index": "apps/NwaifuWeb/src/index.html",
|
||||||
|
"browser": "apps/NwaifuWeb/src/main.ts",
|
||||||
|
"polyfills": ["zone.js"],
|
||||||
|
"tsConfig": "apps/NwaifuWeb/tsconfig.app.json",
|
||||||
|
"inlineStyleLanguage": "less",
|
||||||
|
"assets": ["apps/NwaifuWeb/src/favicon.ico", "apps/NwaifuWeb/src/assets"],
|
||||||
|
"styles": ["apps/NwaifuWeb/src/styles.less"],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "initial",
|
||||||
|
"maximumWarning": "500kb",
|
||||||
|
"maximumError": "1mb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "2kb",
|
||||||
|
"maximumError": "4kb"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputHashing": "all"
|
||||||
|
},
|
||||||
|
"development": {
|
||||||
|
"optimization": false,
|
||||||
|
"extractLicenses": false,
|
||||||
|
"sourceMap": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultConfiguration": "production"
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"buildTarget": "NwaifuWeb:build:production"
|
||||||
|
},
|
||||||
|
"development": {
|
||||||
|
"buildTarget": "NwaifuWeb:build:development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultConfiguration": "development"
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"buildTarget": "NwaifuWeb:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"executor": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"polyfills": ["zone.js", "zone.js/testing"],
|
||||||
|
"tsConfig": "apps/NwaifuWeb/tsconfig.spec.json",
|
||||||
|
"inlineStyleLanguage": "less",
|
||||||
|
"assets": ["apps/NwaifuWeb/src/favicon.ico", "apps/NwaifuWeb/src/assets"],
|
||||||
|
"styles": ["apps/NwaifuWeb/src/styles.less"],
|
||||||
|
"scripts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"executor": "@nx/eslint:lint",
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": ["apps/NwaifuWeb/**/*.ts", "apps/NwaifuWeb/**/*.html"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,5 @@
|
|||||||
<app-panel></app-panel>
|
<app-panel></app-panel>
|
||||||
</header>
|
</header>
|
||||||
<main class="main">
|
<main class="main">
|
||||||
<app-modal></app-modal>
|
<router-outlet></router-outlet>
|
||||||
<app-dock></app-dock>
|
|
||||||
</main>
|
</main>
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from "@angular/core/testing";
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from "./app.component";
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe("AppComponent", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [AppComponent],
|
imports: [AppComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create the app', () => {
|
it("should create the app", () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
const app = fixture.componentInstance;
|
const app = fixture.componentInstance;
|
||||||
expect(app).toBeTruthy();
|
expect(app).toBeTruthy();
|
||||||
@@ -17,13 +17,13 @@ describe('AppComponent', () => {
|
|||||||
it(`should have the 'NwaifuWeb' title`, () => {
|
it(`should have the 'NwaifuWeb' title`, () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
const app = fixture.componentInstance;
|
const app = fixture.componentInstance;
|
||||||
expect(app.title).toEqual('NwaifuWeb');
|
expect(app.title).toEqual("NwaifuWeb");
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render title', () => {
|
it("should render title", () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const compiled = fixture.nativeElement as HTMLElement;
|
const compiled = fixture.nativeElement as HTMLElement;
|
||||||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, NwaifuWeb');
|
expect(compiled.querySelector("h1")?.textContent).toContain("Hello, NwaifuWeb");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { DockComponent } from "./modules/dock/dock.component";
|
import { RouterModule } from '@angular/router';
|
||||||
import { ModalComponent } from "./modules/modal/modal.component";
|
|
||||||
import { PanelComponent } from "./modules/panel/panel.component";
|
import { PanelComponent } from "./modules/panel/panel.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [PanelComponent, DockComponent, ModalComponent],
|
imports: [PanelComponent, RouterModule],
|
||||||
templateUrl: "./app.component.html",
|
templateUrl: "./app.component.html",
|
||||||
styleUrl: "./app.component.less",
|
styleUrl: "./app.component.less",
|
||||||
})
|
})
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import { APP_INITIALIZER, ApplicationConfig } from "@angular/core";
|
import { APP_INITIALIZER, ApplicationConfig } from "@angular/core";
|
||||||
|
|
||||||
import { provideHttpClient } from "@angular/common/http";
|
import { provideHttpClient } from "@angular/common/http";
|
||||||
|
import { provideRouter } from '@angular/router';
|
||||||
|
import { routes } from './app.routes';
|
||||||
import { TranslateService } from "./services/translate.service";
|
import { TranslateService } from "./services/translate.service";
|
||||||
|
|
||||||
export function setupTranslateServiceFactory(service: TranslateService) {
|
export function setupTranslateServiceFactory(service: TranslateService) {
|
||||||
@@ -10,6 +12,7 @@ export function setupTranslateServiceFactory(service: TranslateService) {
|
|||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
|
provideRouter(routes),
|
||||||
provideHttpClient(),
|
provideHttpClient(),
|
||||||
TranslateService,
|
TranslateService,
|
||||||
{
|
{
|
||||||
19
apps/NwaifuWeb/src/app/app.routes.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { Routes } from "@angular/router";
|
||||||
|
import { MainPageComponent } from './pages/main/main.component';
|
||||||
|
import { SecondComponent } from './pages/second/second.component';
|
||||||
|
|
||||||
|
export const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: MainPageComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'second',
|
||||||
|
component: SecondComponent
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div class="desktop-icon">
|
||||||
|
<img [src]="image" [alt]="alt" [title]="name" />
|
||||||
|
<span>{{ name }}</span>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
.desktop-icon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 3rem;
|
||||||
|
height: 3rem;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'desktop-icon',
|
||||||
|
templateUrl: './desktop-icon.component.html',
|
||||||
|
styleUrls: ['./desktop-icon.component.less'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, RouterModule]
|
||||||
|
})
|
||||||
|
export class DesktopIconComponent {
|
||||||
|
@Input() image: string = '';
|
||||||
|
@Input() alt: string = '';
|
||||||
|
@Input() name: string = '';
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import { Component, ElementRef, HostListener, ViewChild } from "@angular/core";
|
|||||||
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
|
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
|
||||||
import { faGithub } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub } from "@fortawesome/free-brands-svg-icons";
|
||||||
import { faPowerOff, faVolumeHigh } from "@fortawesome/free-solid-svg-icons";
|
import { faPowerOff, faVolumeHigh } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { TranslationPipe } from '../../pipes/translation.pipe';
|
import { TranslationPipe } from "../../pipes/translation.pipe";
|
||||||
import { PanelSevice } from "../../services/panel.service";
|
import { PanelSevice } from "../../services/panel.service";
|
||||||
import { TranslateService } from "../../services/translate.service";
|
import { TranslateService } from "../../services/translate.service";
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ import { TranslateService } from "../../services/translate.service";
|
|||||||
styleUrls: ["./panel.component.less"],
|
styleUrls: ["./panel.component.less"],
|
||||||
})
|
})
|
||||||
export class PanelComponent {
|
export class PanelComponent {
|
||||||
source_code_btn_title = "SOURCE_CODE_TITLE"
|
source_code_btn_title = "SOURCE_CODE_TITLE";
|
||||||
|
|
||||||
public time = "";
|
public time = "";
|
||||||
faGithub = faGithub;
|
faGithub = faGithub;
|
||||||
3
apps/NwaifuWeb/src/app/pages/main/main.component.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<desktop-icon alt='test' name='test' image='../../../assets/svg/logo-gitea.svg'></desktop-icon>
|
||||||
|
<app-modal></app-modal>
|
||||||
|
<app-dock></app-dock>
|
||||||
14
apps/NwaifuWeb/src/app/pages/main/main.component.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { DesktopIconComponent } from '../../modules/desktop-icon/desktop-icon.component';
|
||||||
|
import { DockComponent } from '../../modules/dock/dock.component';
|
||||||
|
import { ModalComponent } from '../../modules/modal/modal.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-main-page',
|
||||||
|
templateUrl: './main.component.html',
|
||||||
|
styleUrls: ['./main.component.less'],
|
||||||
|
imports: [DockComponent, ModalComponent, CommonModule, DesktopIconComponent],
|
||||||
|
standalone: true
|
||||||
|
})
|
||||||
|
export class MainPageComponent {}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<h1>Test</h1>
|
||||||
12
apps/NwaifuWeb/src/app/pages/second/second.component.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-second',
|
||||||
|
templateUrl: './second.component.html',
|
||||||
|
styleUrls: ['./second.component.less'],
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule]
|
||||||
|
})
|
||||||
|
export class SecondComponent {
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 470 KiB After Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
5
apps/NwaifuWeb/src/main.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { bootstrapApplication } from "@angular/platform-browser";
|
||||||
|
import { appConfig } from "./app/app.config";
|
||||||
|
import { AppComponent } from "./app/app.component";
|
||||||
|
|
||||||
|
bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
|
||||||
9
apps/NwaifuWeb/tsconfig.app.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc",
|
||||||
|
"types": []
|
||||||
|
},
|
||||||
|
"files": ["src/main.ts"],
|
||||||
|
"include": ["src/**/*.d.ts"]
|
||||||
|
}
|
||||||
8
apps/NwaifuWeb/tsconfig.spec.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc",
|
||||||
|
"types": ["jasmine"]
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
||||||
|
}
|
||||||
43
karma.conf.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
// Karma configuration file, see link for more information
|
||||||
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
|
||||||
|
const { join } = require("path");
|
||||||
|
const { constants } = require("karma");
|
||||||
|
|
||||||
|
module.exports = () => {
|
||||||
|
return {
|
||||||
|
basePath: "",
|
||||||
|
frameworks: ["jasmine", "@angular-devkit/build-angular"],
|
||||||
|
plugins: [
|
||||||
|
require("karma-jasmine"),
|
||||||
|
require("karma-chrome-launcher"),
|
||||||
|
require("karma-jasmine-html-reporter"),
|
||||||
|
require("karma-coverage"),
|
||||||
|
require("@angular-devkit/build-angular/plugins/karma"),
|
||||||
|
],
|
||||||
|
client: {
|
||||||
|
jasmine: {
|
||||||
|
// you can add configuration options for Jasmine here
|
||||||
|
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||||
|
// for example, you can disable the random execution with `random: false`
|
||||||
|
// or set a specific seed with `seed: 4321`
|
||||||
|
},
|
||||||
|
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||||
|
},
|
||||||
|
jasmineHtmlReporter: {
|
||||||
|
suppressAll: true, // removes the duplicated traces
|
||||||
|
},
|
||||||
|
coverageReporter: {
|
||||||
|
dir: join(__dirname, "./coverage"),
|
||||||
|
subdir: ".",
|
||||||
|
reporters: [{ type: "html" }, { type: "text-summary" }],
|
||||||
|
},
|
||||||
|
reporters: ["progress", "kjhtml"],
|
||||||
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: constants.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
|
browsers: ["Chrome"],
|
||||||
|
singleRun: true,
|
||||||
|
};
|
||||||
|
};
|
||||||
0
libs/.gitkeep
Normal file
1
nx-cloud.env.example
Normal file
@@ -0,0 +1 @@
|
|||||||
|
NX_CLOUD_ACCESS_TOKEN=TOKEN
|
||||||
40
nx.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"defaultBase": "main",
|
||||||
|
"namedInputs": {
|
||||||
|
"sharedGlobals": [],
|
||||||
|
"default": ["{projectRoot}/**/*", "sharedGlobals"],
|
||||||
|
"production": [
|
||||||
|
"default",
|
||||||
|
"!{projectRoot}/tsconfig.spec.json",
|
||||||
|
"!{projectRoot}/**/*.spec.[jt]s",
|
||||||
|
"!{projectRoot}/karma.conf.js",
|
||||||
|
"!{projectRoot}/.eslintrc.json",
|
||||||
|
"!{projectRoot}/eslint.config.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targetDefaults": {
|
||||||
|
"build": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"inputs": ["production", "^production"],
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"inputs": ["default", "^production", "{workspaceRoot}/karma.conf.js"],
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/eslint.config.js"],
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"@nx/eslint:lint": {
|
||||||
|
"cache": true,
|
||||||
|
"inputs": [
|
||||||
|
"default",
|
||||||
|
"{workspaceRoot}/.eslintrc.json",
|
||||||
|
"{workspaceRoot}/.eslintignore",
|
||||||
|
"{workspaceRoot}/eslint.config.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nxCloudAccessToken": "${NX_CLOUD_ACCESS_TOKEN}"
|
||||||
|
}
|
||||||
26
package.json
@@ -3,11 +3,11 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "nx serve NwaifuWeb",
|
||||||
"build": "ng build --base-href https://nwaifu.su/ --configuration production",
|
"build": "nx build NwaifuWeb --base-href https://nwaifu.su/ --configuration production",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "nx build NwaifuWeb --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "nx test",
|
||||||
"lint": "ng lint"
|
"lint": "nx lint"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -31,25 +31,35 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^17.2.2",
|
"@angular-devkit/build-angular": "^17.2.2",
|
||||||
"@angular-eslint/builder": "17.2.1",
|
"@angular-devkit/core": "^17.2.2",
|
||||||
|
"@angular-devkit/schematics": "^17.2.2",
|
||||||
"@angular-eslint/eslint-plugin": "17.2.1",
|
"@angular-eslint/eslint-plugin": "17.2.1",
|
||||||
"@angular-eslint/eslint-plugin-template": "17.2.1",
|
"@angular-eslint/eslint-plugin-template": "17.2.1",
|
||||||
"@angular-eslint/schematics": "17.2.1",
|
|
||||||
"@angular-eslint/template-parser": "17.2.1",
|
"@angular-eslint/template-parser": "17.2.1",
|
||||||
"@angular/cli": "^17.2.2",
|
"@angular/cli": "^17.2.2",
|
||||||
"@angular/compiler-cli": "^17.2.0",
|
"@angular/compiler-cli": "^17.2.0",
|
||||||
|
"@nx/angular": "19.0.2",
|
||||||
|
"@nx/eslint": "19.0.2",
|
||||||
|
"@nx/js": "19.0.2",
|
||||||
|
"@nx/workspace": "19.0.2",
|
||||||
|
"@schematics/angular": "^17.2.2",
|
||||||
|
"@swc-node/register": "~1.8.0",
|
||||||
|
"@swc/core": "~1.3.85",
|
||||||
|
"@swc/helpers": "~0.5.2",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
"@typescript-eslint/eslint-plugin": "6.19.0",
|
"@typescript-eslint/eslint-plugin": "6.19.0",
|
||||||
"@typescript-eslint/parser": "6.19.0",
|
"@typescript-eslint/parser": "6.19.0",
|
||||||
"autoprefixer": "^10.4.18",
|
"autoprefixer": "^10.4.18",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "~8.57.0",
|
||||||
"jasmine-core": "~5.1.0",
|
"jasmine-core": "~5.1.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
"karma-coverage": "~2.2.0",
|
"karma-coverage": "~2.2.0",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
|
"nx": "19.0.2",
|
||||||
"postcss": "^8.4.35",
|
"postcss": "^8.4.35",
|
||||||
|
"prettier": "^2.6.2",
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"typescript": "~5.3.2"
|
"typescript": "~5.3.2"
|
||||||
}
|
}
|
||||||
|
|||||||
18326
pnpm-lock.yaml
generated
@@ -1,3 +0,0 @@
|
|||||||
import { Routes } from '@angular/router';
|
|
||||||
|
|
||||||
export const routes: Routes = [];
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import { bootstrapApplication } from '@angular/platform-browser';
|
|
||||||
import { appConfig } from './app/app.config';
|
|
||||||
import { AppComponent } from './app/app.component';
|
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, appConfig)
|
|
||||||
.catch((err) => console.error(err));
|
|
||||||
0
tools/generators/.gitkeep
Normal file
12
tools/tsconfig.tools.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../dist/out-tsc/tools",
|
||||||
|
"rootDir": ".",
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es5",
|
||||||
|
"types": ["node"],
|
||||||
|
"importHelpers": false
|
||||||
|
},
|
||||||
|
"include": ["**/*.ts"]
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "./out-tsc/app",
|
|
||||||
"types": []
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/main.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
||||||
{
|
{
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
@@ -19,15 +18,16 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"useDefineForClassFields": false,
|
"useDefineForClassFields": false,
|
||||||
"lib": [
|
"lib": ["ES2022", "dom"],
|
||||||
"ES2022",
|
"paths": {},
|
||||||
"dom"
|
"baseUrl": ".",
|
||||||
]
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"strictInputAccessModifiers": true,
|
"strictInputAccessModifiers": true,
|
||||||
"strictTemplates": true
|
"strictTemplates": true
|
||||||
}
|
},
|
||||||
|
"exclude": ["node_modules", "tmp"]
|
||||||
}
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "./out-tsc/spec",
|
|
||||||
"types": [
|
|
||||||
"jasmine"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||