Skip to content
Merged

Next #3227

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
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

# Custom
.nx
playground
.playgrounds
apps/dev/angular
apps/dev/react
apps/dev/web
NOTES.md
/test-results
__screenshots__
Expand Down Expand Up @@ -67,4 +68,4 @@ devenv.local.nix
vite.config.*.timestamp*
vitest.config.*.timestamp*
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
.github/instructions/nx.instructions.md
4 changes: 3 additions & 1 deletion .nxignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
!playground
**/.*/
!apps/dev/web
!apps/dev/react
!apps/dev/angular
2 changes: 1 addition & 1 deletion .templates/angular/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["../../.eslintrc.json"],
"extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
30 changes: 15 additions & 15 deletions .templates/angular/project.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"name": "angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "angular-dev",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"prefix": "abgov",
"sourceRoot": "playground/angular/src",
"sourceRoot": "apps/dev/angular/src",
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:application",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/playground/angular",
"index": "playground/angular/src/index.html",
"browser": "playground/angular/src/main.ts",
"outputPath": "dist/apps/dev/angular",
"index": "apps/dev/angular/src/index.html",
"browser": "apps/dev/angular/src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "playground/angular/tsconfig.app.json",
"tsConfig": "apps/dev/angular/tsconfig.app.json",
"assets": [
"playground/angular/src/favicon.ico",
"playground/angular/src/assets"
"apps/dev/angular/src/favicon.ico",
"apps/dev/angular/src/assets"
],
"styles": ["playground/angular/src/styles.css"],
"styles": ["apps/dev/angular/src/styles.css"],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "2mb",
"maximumError": "3mb"
},
{
"type": "anyComponentStyle",
Expand All @@ -50,18 +50,18 @@
"executor": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "angular:build:production"
"buildTarget": "angular-dev:build:production"
},
"development": {
"buildTarget": "angular:build:development"
"buildTarget": "angular-dev:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "angular:build"
"buildTarget": "angular-dev:build"
}
},
"lint": {
Expand Down
8 changes: 3 additions & 5 deletions .templates/angular/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { ComponentWrapperPageComponent } from "./component-wrapper";
import { PlaygroundComponent } from "./playground";

const routes: Routes = [
{ path: "/", component: ComponentWrapperPageComponent },
];
const routes: Routes = [{ path: "", component: PlaygroundComponent }];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule { }
export class AppRoutingModule {}
9 changes: 6 additions & 3 deletions .templates/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {Component, OnInit} from "@angular/core";
import { Component, OnInit } from "@angular/core";
import { RouterOutlet } from "@angular/router";

@Component({
selector: "goab-root",
template: "<abgov-component-wrapper></abgov-component-wrapper>"
selector: "abgov-root",
template: "<router-outlet></router-outlet>",
standalone: true,
imports: [RouterOutlet],
})
export class AppComponent implements OnInit {
ngOnInit() {
Expand Down
13 changes: 7 additions & 6 deletions .templates/angular/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import { AngularComponentsModule } from "@abgov/angular-components";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { NgForOf, NgIf } from "@angular/common";
import { ComponentWrapperPageComponent } from "./component-wrapper";
import { PlaygroundComponent } from "./playground";
import { AppRoutingModule } from "./app-routing.module";
import "@abgov/web-components";

@NgModule({
declarations: [
AppComponent,
],
declarations: [],
imports: [
AppComponent,
AngularComponentsModule,
ComponentWrapperPageComponent,
PlaygroundComponent,
BrowserModule,
AppRoutingModule,
FormsModule,
NgForOf,
NgIf,
Expand All @@ -27,4 +28,4 @@ import "@abgov/web-components";
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule { }
export class AppModule {}
112 changes: 0 additions & 112 deletions .templates/angular/src/app/component-wrapper.ts

This file was deleted.

24 changes: 24 additions & 0 deletions .templates/angular/src/app/playground.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { CUSTOM_ELEMENTS_SCHEMA, Component } from "@angular/core";
import { CommonModule } from "@angular/common";
import {
GoabInput,
/* Import components here */
} from "@abgov/angular-components";

@Component({
standalone: true,
selector: "abgov-app",
template: `
<div style="width: 1024px; margin: 0 auto;">
<goab-input placeholder="Hello, World!" />
</div>
`,

schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [
CommonModule,
GoabInput,
// add test components here
],
})
export class PlaygroundComponent {}
2 changes: 1 addition & 1 deletion .templates/angular/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</head>

<body>
<goab-root></goab-root>
<abgov-root></abgov-root>
</body>

</html>
2 changes: 1 addition & 1 deletion .templates/angular/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* You can add global styles to this file, and also import other style files */
@import "../../../dist/libs/web-components/index.css";
@import "../../../../dist/libs/web-components/index.css";

:root {
--goa-space-fill: 32ch;
Expand Down
2 changes: 1 addition & 1 deletion .templates/angular/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"outDir": "../../../dist/out-tsc",
"types": []
},
"files": ["src/main.ts"],
Expand Down
2 changes: 1 addition & 1 deletion .templates/angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"path": "./tsconfig.editor.json"
}
],
"extends": "../../tsconfig.base.json",
"extends": "../../../tsconfig.base.json",
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion .templates/react/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
20 changes: 10 additions & 10 deletions .templates/react/project.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "react",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "playground/react/src",
"name": "react-dev",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/dev/react/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/playground/react"
"outputPath": "dist/apps/dev/react"
},
"configurations": {
"development": {
Expand All @@ -24,15 +24,15 @@
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "react:build"
"buildTarget": "react-dev:build"
},
"configurations": {
"development": {
"buildTarget": "react:build:development",
"buildTarget": "react-dev:build:development",
"hmr": true
},
"production": {
"buildTarget": "react:build:production",
"buildTarget": "react-dev:build:production",
"hmr": false
}
}
Expand All @@ -41,14 +41,14 @@
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "react:build"
"buildTarget": "react-dev:build"
},
"configurations": {
"development": {
"buildTarget": "react:build:development"
"buildTarget": "react-dev:build:development"
},
"production": {
"buildTarget": "react:build:production"
"buildTarget": "react-dev:build:production"
}
}
},
Expand Down
Loading
Loading