Skip to content

Commit

Permalink
Merge branch 'dev' into enhancement-use-volatile-emits
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacThoman committed Jan 3, 2025
2 parents 078bd4f + 21eda33 commit 75fd65f
Show file tree
Hide file tree
Showing 58 changed files with 5,454 additions and 4,729 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- '**'
- "**"
pull_request:
branches:
- main
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: 'latest'
deno-version: "latest"
- name: Build project
run: deno task build
- name: List build directory contents
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: 'latest'
deno-version: "latest"
- name: Build project
run: deno task build
- name: Run lint
Expand All @@ -53,11 +53,25 @@ jobs:
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: 'latest'
deno-version: "latest"
- name: install
run: deno install
- name: check src
run: deno check ./src/client ./src/server
# Format Job
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: "latest"
- name: install
run: deno install
- name: fmt check src
run: deno fmt --check src

# Healthcheck Job
health:
Expand All @@ -68,7 +82,7 @@ jobs:
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: 'latest'
deno-version: "latest"
- name: Start server
run: deno task start &
- name: Health check
Expand Down Expand Up @@ -122,7 +136,7 @@ jobs:
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: 'latest'
deno-version: "latest"
- name: Run security audit
run: npm audit --audit-level=high

Expand All @@ -137,7 +151,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: 'false'
persist-credentials: "false"
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -153,4 +167,3 @@ jobs:
GIT_COMMITTER_NAME: "github-actions[bot]"
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
run: npx semantic-release --extends ./release.config.js

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ dist
.vite/deps/

.vscode/

.nx/workspace-data/
50 changes: 28 additions & 22 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
{
"tasks": {
"dev": "deno run -A --node-modules-dir npm:vite",
"build": "deno run -A --node-modules-dir npm:vite build",
"preview": "deno run -A --node-modules-dir npm:vite preview",
"serve": "deno run --allow-net --allow-read jsr:@std/http@1/file-server dist/",
"start": "deno task build && deno run --allow-read --allow-env --allow-net --allow-write main.ts"
},
"compilerOptions": {
"lib": ["ES2020", "DOM", "DOM.Iterable", "deno.ns"]
},
"imports": {
"@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
"@oak/oak": "jsr:@oak/oak@^17.1.3",
"@std/http": "jsr:@std/http@^1.0.10",
"vite": "npm:vite@^5.4.8"
},
"lint": {
"include": ["src/"],
"exclude": ["dist/", "node_modules/", "public/"]

}
}
"tasks": {
"dev": "deno run -A --node-modules-dir npm:vite",
"build": "deno run -A --node-modules-dir npm:vite build",
"preview": "deno run -A --node-modules-dir npm:vite preview",
"serve": "deno run --allow-net --allow-read jsr:@std/http@1/file-server dist/",
"start": "deno task build && deno run --allow-read --allow-env --allow-net --allow-write main.ts"
},
"compilerOptions": {
"lib": ["ES2020", "DOM", "DOM.Iterable", "deno.ns"]
},
"imports": {
"@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
"@oak/oak": "jsr:@oak/oak@^17.1.3",
"@std/http": "jsr:@std/http@^1.0.10",
"vite": "npm:vite@^5.4.8"
},
"lint": {
"include": ["src/"],
"exclude": ["dist/", "node_modules/", "public/"]
},
"fmt": {
"options": {
"lineWidth": 120,
"useTabs": true,
"singleQuote": true
}
}
}
8 changes: 4 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
template: `<router-outlet />`,
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
template: `<router-outlet />`,
})
export class AppComponent {}
6 changes: 3 additions & 3 deletions src/app/app.config.server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
import { ApplicationConfig, mergeApplicationConfig } from '@angular/core';
import { provideServerRendering } from '@angular/platform-server';

import { appConfig } from "./app.config.ts";
import { appConfig } from './app.config.ts';

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

export const config = mergeApplicationConfig(appConfig, serverConfig);
24 changes: 10 additions & 14 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import {
provideHttpClient,
withFetch,
withInterceptors,
} from '@angular/common/http';
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideClientHydration } from '@angular/platform-browser';
import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';

export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideFileRouter(),
provideHttpClient(
withFetch(),
withInterceptors([requestContextInterceptor])
),
provideClientHydration(),
],
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideFileRouter(),
provideHttpClient(
withFetch(),
withInterceptors([requestContextInterceptor]),
),
provideClientHydration(),
],
};
1 change: 1 addition & 0 deletions src/app/game/game.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/app/game/game.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<p>game works!</p>
<div #rendererContainer class="game-container w-full h-screen absolute top-0 left-0"></div>
<div #rendererContainer class="game-container w-full h-screen absolute top-0 left-0"></div>
23 changes: 0 additions & 23 deletions src/app/game/game.component.spec.ts

This file was deleted.

29 changes: 15 additions & 14 deletions src/app/game/game.component.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
// game.component.ts
import { Component, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
import { Game } from "../../client/core/Game.ts";
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
import { Game } from '../../client/core/Game.ts';

@Component({
selector: 'app-game',
templateUrl: './game.component.html',
standalone: true,
selector: 'app-game',
templateUrl: './game.component.html',
standalone: true,
})
export class GameComponent implements AfterViewInit {
@ViewChild('rendererContainer') rendererContainer!: ElementRef;
private game?: Game;
@ViewChild('rendererContainer')
rendererContainer!: ElementRef;
private game?: Game;

ngAfterViewInit() {
this.game = new Game(this.rendererContainer.nativeElement);
this.game.start();
}
ngAfterViewInit() {
this.game = new Game(this.rendererContainer.nativeElement);
this.game.start();
}

ngOnDestroy() {
// Add cleanup if needed
}
ngOnDestroy() {
// Add cleanup if needed
}
}
16 changes: 8 additions & 8 deletions src/app/pages/index.page.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Component } from '@angular/core';
import {GameComponent} from "../game/game.component.ts";
import { GameComponent } from '../game/game.component.ts';

@Component({
selector: 'app-home',
standalone: true,
template: `<app-game></app-game>`,
styles: ``,
imports: [
GameComponent
]
selector: 'app-home',
standalone: true,
template: `<app-game></app-game>`,
styles: ``,
imports: [
GameComponent,
],
})
export default class HomeComponent {}
Loading

0 comments on commit 75fd65f

Please sign in to comment.