Skip to content

Commit eff3f62

Browse files
committed
fix fmt
1 parent f15599c commit eff3f62

File tree

4 files changed

+36
-30
lines changed

4 files changed

+36
-30
lines changed

example/app.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component } from '@angular/core';
1+
import { Component } from "@angular/core";
22

33
@Component({
4-
selector: 'my-app',
5-
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.css']
4+
selector: "my-app",
5+
templateUrl: "./app.component.html",
6+
styleUrls: ["./app.component.css"],
77
})
88
export class AppComponent {
9-
versionDeno = Deno.version.deno;
9+
versionDeno = Deno.version.deno;
1010
}

example/app.module.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
2-
import { NgModule } from '@angular/core';
3-
import { ServerModule } from '../mod.ts';
4-
import { AppComponent } from './app.component.ts';
5-
1+
import { NgModule } from "@angular/core";
2+
import { ServerModule } from "../mod.ts";
3+
import { AppComponent } from "./app.component.ts";
64

75
@NgModule({
8-
imports: [ServerModule],
9-
declarations: [AppComponent],
10-
bootstrap: [AppComponent],
11-
providers: []
6+
imports: [ServerModule],
7+
declarations: [AppComponent],
8+
bootstrap: [AppComponent],
9+
providers: [],
1210
})
13-
export class AppModule { }
11+
export class AppModule {}

example/main.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
import { CompilerFactory, enableProdMode } from '@angular/core';
2-
import { bootstrap, CommonEngine } from '../mod.ts';
3-
import { AppModule } from './app.module.ts';
1+
import { CompilerFactory, enableProdMode } from "@angular/core";
2+
import { bootstrap, CommonEngine } from "../mod.ts";
3+
import { AppModule } from "./app.module.ts";
44

55
import "../reflect.ts";
6-
import 'zone.js';
6+
import "zone.js";
77

88
const { readFile } = Deno;
99
const decoder = new TextDecoder();
1010

11-
const indexHtml = decoder.decode(await readFile('index.html'));
11+
const indexHtml = decoder.decode(await readFile("index.html"));
1212

1313
enableProdMode();
1414

1515
const ref: any = await bootstrap(AppModule, indexHtml);
1616

17-
export const engine = new CommonEngine(ref.injector.get(CompilerFactory), AppModule);
17+
export const engine = new CommonEngine(
18+
ref.injector.get(CompilerFactory),
19+
AppModule,
20+
);
1821

1922
// Render page
2023

21-
console.log(await engine.render({ document: indexHtml, url: "/" }));
24+
console.log(await engine.render({ document: indexHtml, url: "/" }));

example/server.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
import { serve } from "https://deno.land/std@0.59.0/http/server.ts";
22

3-
import { CompilerFactory, enableProdMode } from '@angular/core';
4-
import { bootstrap, CommonEngine } from '../mod.ts';
5-
import { AppModule } from './app.module.ts';
3+
import { CompilerFactory, enableProdMode } from "@angular/core";
4+
import { bootstrap, CommonEngine } from "../mod.ts";
5+
import { AppModule } from "./app.module.ts";
66

77
import "../reflect.ts";
8-
import 'zone.js';
8+
import "zone.js";
99

1010
const { readFile } = Deno;
1111
const decoder = new TextDecoder();
1212

13-
const indexHtml = decoder.decode(await readFile('index.html'));
13+
const indexHtml = decoder.decode(await readFile("index.html"));
1414

1515
enableProdMode();
1616

1717
const ref: any = await bootstrap(AppModule, indexHtml);
1818

19-
export const engine = new CommonEngine(ref.injector.get(CompilerFactory), AppModule);
19+
export const engine = new CommonEngine(
20+
ref.injector.get(CompilerFactory),
21+
AppModule,
22+
);
2023

2124
const s = serve({ port: 8000 });
2225

2326
for await (const req of s) {
24-
const body: string = await engine.render({ document: indexHtml, url: req.url });
27+
const body: string = await engine.render(
28+
{ document: indexHtml, url: req.url },
29+
);
2530
req.respond({ body });
26-
}
31+
}

0 commit comments

Comments
 (0)