summaryrefslogtreecommitdiff
path: root/cli/tools/init/mod.rs
AgeCommit message (Collapse)Author
2024-10-29refactor(init): inline routing in deno init --serve template (#26595)Yoshiya Hinosawa
2024-09-02fix(cli/tools): correct `deno init --serve` template behavior (#25318)Coty
2024-08-16feat(config/jsr): add license field (#25056)David Sherret
1. Adds a new "license" field. 1. Adds this field by default when doing `deno init --lib`
2024-08-08feat: `deno init --serve` (#24897)Bartek Iwańczuk
This commit adds "--serve" flag to "deno init" subcommand, that provides a template for quick starting a project using "deno serve". --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-08chore: change property order in generated `deno.json` (#24953)Marvin Hagemeister
This moves all package-specific object keys right next to each other.
2024-07-14fix(init): use bare specifier for `jsr:@std/assert` (#24581)David Sherret
Closes #24580
2024-07-12fix(cli/init): broken link in deno init sample template (#24545)vwh
This commit fixes the broken link in the sample template provided by the deno init command.
2024-07-09feat(cli): `deno init --lib` (#22499)muddlebee
Closes #22287 Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: David Sherret <dsherret@gmail.com>
2024-03-27feat(init): use jsr specifier for @std/assert (#23073)Bartek Iwańczuk
This commit changes "deno init" subcommand to use "jsr:" specifier for standard library "assert" module. It is unversioned, but we will change it to `@^1` once `@std/assert` release version 1.0. This allows us to start decoupling `deno` and `deno_std` release. The release scripts have been updated to take that into account.
2024-03-11chore: enable clippy unused_async rule (#22834)David Sherret
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-09-12fix(init): skip existing files instead of erroring (#20434)Leigh McCulloch
### What Skip writing files from the template if the files already exist in the project directory. ### Why When I run deno init in a directory that already has a main.ts, or one of the other template files, I usually want to initialize a workspace around a file I've started working in. A hard error in this case seems counter productive. An informational message about what's being skipped seems sufficient. Close #20433
2023-08-29refactor(init): simplify template (#20325)Ryan Dahl
- 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.
2023-03-23refactor(init): remove CURRENT_STD_URL (#18375)Bartek Iwańczuk
There's no point in having `Lazy<Url>`, since the only use case is string substitution in the "deno init" subcommand.
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-17fix(init): update comment style (#17074)Pig Fang
The output of `init` are commands, so this should be treated as a "Shell script". In Shell script, comments must start with `#`, not `//`. (This also makes the commands example easier to be copied to somewhere.)
2022-12-10feat(init): Generate main_bench.ts by default (#16786)sigmaSd
This commit changes "deno init" to generate "main_bench.ts" file which scaffold two example bench cases.
2022-12-09feat(init): Use jsonc for configuration file (#17002)Bartek Iwańczuk
Generate "deno.jsonc" instead of "deno.json" when running "deno init" subcommand.
2022-12-08feat(init): Generate deno.json by default (#16389)Bartek Iwańczuk
Updates `deno init` subcommand to create a `deno.json` when initializing a new project. Slightly changes the output, to make it more readable.
2022-09-02fix(init): suppress info logs when using quiet mode (#15741)Geert-Jan Zwiers
2022-08-29refactor(cli): Remove cli/node dependency on cli/compat (#15654)Bartek Iwańczuk
2022-08-20feat: add "deno init" subcommand (#15469)Leo Kettmeir
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>