summaryrefslogtreecommitdiff
path: root/cli/standalone.rs
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2022-08-20 01:37:05 +0200
committerGitHub <noreply@github.com>2022-08-20 01:37:05 +0200
commit1ffbd561642d05a05e18ada764d50581dea779ef (patch)
tree93bc8b6c613b8f76c2b5ca713975bca44df4ad61 /cli/standalone.rs
parent5beec3f106b0890cc76150d0e3b3661c576d4c3b (diff)
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>
Diffstat (limited to 'cli/standalone.rs')
0 files changed, 0 insertions, 0 deletions