chore: rename *_deps.ts -> deps.*.ts (#206)

As per David's suggestion.
This commit is contained in:
Luca Casonato
2022-05-23 16:05:33 +02:00
committed by GitHub
parent f9f0125282
commit fd6724c050
57 changed files with 70 additions and 70 deletions
+9 -9
View File
@@ -66,19 +66,19 @@ async function init(directory: string) {
await Deno.mkdir(join(directory, "islands"), { recursive: true });
await Deno.mkdir(join(directory, "static"), { recursive: true });
const CLIENT_DEPS_TS = `export * from "${new URL(
const DEPS_CLIENT_TS = `export * from "${new URL(
"../../runtime.ts",
import.meta.url,
)}";\n`;
await Deno.writeTextFile(join(directory, "client_deps.ts"), CLIENT_DEPS_TS);
const SERVER_DEPS_TS = `export * from "${new URL(
await Deno.writeTextFile(join(directory, "deps.client.ts"), DEPS_CLIENT_TS);
const DEPS_SERVER_TS = `export * from "${new URL(
"../../server.ts",
import.meta.url,
)}";\n`;
await Deno.writeTextFile(join(directory, "server_deps.ts"), SERVER_DEPS_TS);
await Deno.writeTextFile(join(directory, "deps.server.ts"), DEPS_SERVER_TS);
const ROUTES_INDEX_TSX = `/** @jsx h */
import { h } from "../client_deps.ts";
import { h } from "../deps.client.ts";
import Counter from "../islands/Counter.tsx";
export default function Home() {
@@ -100,7 +100,7 @@ export default function Home() {
);
const ISLANDS_COUNTER_TSX = `/** @jsx h */
import { h, IS_BROWSER, useState } from "../client_deps.ts";
import { h, IS_BROWSER, useState } from "../deps.client.ts";
interface CounterProps {
start: number;
@@ -127,7 +127,7 @@ export default function Counter(props: CounterProps) {
);
const ROUTES_GREET_TSX = `/** @jsx h */
import { h, PageProps } from "../client_deps.ts";
import { h, PageProps } from "../deps.client.ts";
export default function Greet(props: PageProps) {
return <div>Hello {props.params.name}</div>;
@@ -139,7 +139,7 @@ export default function Greet(props: PageProps) {
);
const ROUTES_API_JOKE_TS =
`import { HandlerContext } from "../../server_deps.ts";
`import { HandlerContext } from "../../deps.server.ts";
// Jokes courtesy of https://punsandoneliners.com/randomness/programmer-jokes/
const JOKES = [
@@ -188,7 +188,7 @@ export const handler = (_req: Request, _ctx: HandlerContext): Response => {
/// <reference lib="deno.ns" />
/// <reference lib="deno.unstable" />
import { start } from "./server_deps.ts";
import { start } from "./deps.server.ts";
import manifest from "./fresh.gen.ts";
await start(manifest);