1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

4 commits

Author SHA1 Message Date
sigmaSd
4eb8e875fd
feat(init): Generate main_bench.ts by default (#16786)
This commit changes "deno init" to generate "main_bench.ts" file
which scaffold two example bench cases.
2022-12-10 00:34:08 +01:00
Bartek Iwańczuk
6794d9fe5d
feat(init): Use jsonc for configuration file (#17002)
Generate "deno.jsonc" instead of "deno.json" when running "deno init"
subcommand.
2022-12-09 23:55:03 +01:00
Bartek Iwańczuk
a6b5d05311
feat(init): Generate deno.json by default (#16389)
Updates `deno init` subcommand to create a `deno.json` when initializing
a new project.

Slightly changes the output, to make it more readable.
2022-12-08 06:34:28 +01:00
Leo Kettmeir
1ffbd56164
feat: add "deno init" subcommand (#15469)
This adds an init subcommand to that creates a project starter similar to cargo init.

```
$ deno init my_project
Project initialized
Run these commands to get started:
  cd my_project
  deno run main.ts
  deno run main_test.ts
$ deno run main.ts
Add 2 + 3 5
$ cat main.ts
export function add(a: number, b: number): number {
  return a + b;
}
if (import.meta.main) {
  console.log("Add 2 + 3", add(2, 3));
}
$ cat main_test.ts
import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts";
import { add } from "./main.ts";
Deno.test(function addTest() {
    assertEquals(add(2, 3), 5);
});
```

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 01:37:05 +02:00