From ff5163af05d95409cbb3d1a13f49a43fefd4849a Mon Sep 17 00:00:00 2001 From: muddlebee Date: Wed, 10 Jul 2024 06:43:34 +0530 Subject: feat(cli): `deno init --lib` (#22499) Closes #22287 Co-authored-by: Asher Gomez Co-authored-by: David Sherret --- cli/tools/init/templates/deno.json | 5 ----- cli/tools/init/templates/main.ts | 8 -------- cli/tools/init/templates/main_test.ts | 6 ------ 3 files changed, 19 deletions(-) delete mode 100644 cli/tools/init/templates/deno.json delete mode 100644 cli/tools/init/templates/main.ts delete mode 100644 cli/tools/init/templates/main_test.ts (limited to 'cli/tools/init/templates') diff --git a/cli/tools/init/templates/deno.json b/cli/tools/init/templates/deno.json deleted file mode 100644 index 3c5130f1d..000000000 --- a/cli/tools/init/templates/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tasks": { - "dev": "deno run --watch main.ts" - } -} diff --git a/cli/tools/init/templates/main.ts b/cli/tools/init/templates/main.ts deleted file mode 100644 index be043e97c..000000000 --- a/cli/tools/init/templates/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function add(a: number, b: number): number { - return a + b; -} - -// Learn more at https://deno.land/manual/examples/module_metadata#concepts -if (import.meta.main) { - console.log("Add 2 + 3 =", add(2, 3)); -} diff --git a/cli/tools/init/templates/main_test.ts b/cli/tools/init/templates/main_test.ts deleted file mode 100644 index 26af2582b..000000000 --- a/cli/tools/init/templates/main_test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { assertEquals } from "jsr:@std/assert"; -import { add } from "./main.ts"; - -Deno.test(function addTest() { - assertEquals(add(2, 3), 5); -}); -- cgit v1.2.3