mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
1ffbd56164
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> |
||
---|---|---|
.. | ||
bench_tests.rs | ||
bundle_tests.rs | ||
cache_tests.rs | ||
check_tests.rs | ||
compat_tests.rs | ||
compile_tests.rs | ||
coverage_tests.rs | ||
doc_tests.rs | ||
eval_tests.rs | ||
fmt_tests.rs | ||
info_tests.rs | ||
init_tests.rs | ||
inspector_tests.rs | ||
install_tests.rs | ||
lint_tests.rs | ||
lsp_tests.rs | ||
mod.rs | ||
repl_tests.rs | ||
run_tests.rs | ||
task_tests.rs | ||
test_tests.rs | ||
upgrade_tests.rs | ||
vendor_tests.rs | ||
watcher_tests.rs | ||
worker_tests.rs |