-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "style: add deno fmt config, CI job"
- Loading branch information
1 parent
21eda33
commit 4b23237
Showing
57 changed files
with
5,337 additions
and
5,418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
{ | ||
"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 | ||
} | ||
} | ||
} | ||
"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/"] | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { ApplicationConfig, mergeApplicationConfig } from '@angular/core'; | ||
import { mergeApplicationConfig, ApplicationConfig } 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
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(), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { GameComponent } from './game.component'; | ||
|
||
describe('GameComponent', () => { | ||
let component: GameComponent; | ||
let fixture: ComponentFixture<GameComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [GameComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(GameComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
// game.component.ts | ||
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core'; | ||
import { Game } from '../../client/core/Game.ts'; | ||
import { Component, ElementRef, ViewChild, AfterViewInit } 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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} |
Oops, something went wrong.