summaryrefslogtreecommitdiff
path: root/cli/tools/init
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2023-08-29 15:58:56 -0400
committerGitHub <noreply@github.com>2023-08-29 19:58:56 +0000
commitf76bfbbe33c4e8e6ac8da9dccd29bd522d9b7e6f (patch)
treeaa0a0eab535d6d41cb75651980e26007e79e2109 /cli/tools/init
parent64045ebc7a4e1c9f77204ffe35563134a453a7c6 (diff)
refactor(init): simplify template (#20325)
- Don't include benchmark file - most people won't need this. - Use deno.json instead of deno.jsonc, because it's a more common file format.
Diffstat (limited to 'cli/tools/init')
-rw-r--r--cli/tools/init/mod.rs8
-rw-r--r--cli/tools/init/templates/deno.json (renamed from cli/tools/init/templates/deno.jsonc)0
-rw-r--r--cli/tools/init/templates/main_bench.ts9
3 files changed, 1 insertions, 16 deletions
diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs
index 7d1d123ed..f0da86006 100644
--- a/cli/tools/init/mod.rs
+++ b/cli/tools/init/mod.rs
@@ -40,10 +40,7 @@ pub async fn init_project(init_flags: InitFlags) -> Result<(), AnyError> {
let main_test_ts = include_str!("./templates/main_test.ts")
.replace("{CURRENT_STD_URL}", deno_std::CURRENT_STD_URL_STR);
create_file(&dir, "main_test.ts", &main_test_ts)?;
- let main_bench_ts = include_str!("./templates/main_bench.ts");
- create_file(&dir, "main_bench.ts", main_bench_ts)?;
-
- create_file(&dir, "deno.jsonc", include_str!("./templates/deno.jsonc"))?;
+ create_file(&dir, "deno.json", include_str!("./templates/deno.json"))?;
info!("✅ {}", colors::green("Project initialized"));
info!("");
@@ -64,8 +61,5 @@ pub async fn init_project(init_flags: InitFlags) -> Result<(), AnyError> {
info!("");
info!(" {}", colors::gray("# Run the tests"));
info!(" deno test");
- info!("");
- info!(" {}", colors::gray("# Run the benchmarks"));
- info!(" deno bench");
Ok(())
}
diff --git a/cli/tools/init/templates/deno.jsonc b/cli/tools/init/templates/deno.json
index 3c5130f1d..3c5130f1d 100644
--- a/cli/tools/init/templates/deno.jsonc
+++ b/cli/tools/init/templates/deno.json
diff --git a/cli/tools/init/templates/main_bench.ts b/cli/tools/init/templates/main_bench.ts
deleted file mode 100644
index 5867ca0a6..000000000
--- a/cli/tools/init/templates/main_bench.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { add } from "./main.ts";
-
-Deno.bench(function addSmall() {
- add(1, 2);
-});
-
-Deno.bench(function addBig() {
- add(2 ** 32, 2 ** 32);
-});