fix: use deno run for init instead of deno create before 2.3.0 (#3746)

## Summary
- Reverts all references from `deno create @fresh/init` back to `deno
run -Ar jsr:@fresh/init` across docs, READMEs, homepage, and CLI help
text
- Removes the deprecation warning in `packages/init/src/mod.ts` that
told users to switch to `deno create`

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bartek Iwańczuk
2026-03-31 09:19:14 +02:00
committed by GitHub
co-authored by Claude Opus 4.6
parent a872a70e5f
commit 3a51f82da6
10 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ with workspace members in `packages/*` and `www/`.
- **`packages/plugin-vite/`** (`@fresh/plugin-vite`): Vite integration plugin
with dev server, SSR/client builds, and HMR.
- **`packages/init/`** (`@fresh/init`): Project scaffolding
(`deno create @fresh/init`).
(`deno run -Ar jsr:@fresh/init`).
- **`packages/update/`** (`@fresh/update`): Automated Fresh 1.x to 2.x migration
tool using ts-morph for AST transforms.
- **`packages/build-id/`** (`@fresh/build-id`): Build/deployment ID generation.
+1 -1
View File
@@ -29,7 +29,7 @@ You can scaffold a new project by running the Fresh init script. To scaffold a
project run the following:
```sh
deno create @fresh/init
deno run -Ar jsr:@fresh/init
```
Then navigate to the newly created project folder:
+1 -1
View File
@@ -9,7 +9,7 @@ Let's set up your first Fresh project. To create a new project, run this
command:
```sh Terminal
deno create @fresh/init
deno run -Ar jsr:@fresh/init
```
This will spawn a short wizard that guides you through the setup, like the
+1 -1
View File
@@ -24,7 +24,7 @@ app.listen();
Create a new Fresh app by running:
```sh Terminal
deno create @fresh/init
deno run -Ar jsr:@fresh/init
```
## Features
+1 -1
View File
@@ -314,7 +314,7 @@ to [update the command](/docs/deployment/deno-compile) to generate the binary.
If you run into problems with upgrading your app, first, try starting a new
Fresh 2 project and looking at the new structure.
eg. `mkdir fresh2-demo && cd fresh2-demo && deno create @fresh/init`
eg. `mkdir fresh2-demo && cd fresh2-demo && deno run -Ar jsr:@fresh/init`
### 2. Document
+1 -1
View File
@@ -11,7 +11,7 @@ web applications.
Generate a new Fresh project with `@fresh/init`:
```sh
deno create @fresh/init
deno run -Ar jsr:@fresh/init
```
Add middleware, routes, & endpoints as needed via the `routes/` folder or
+1 -1
View File
@@ -3,7 +3,7 @@
This is a CLI tool to bootstrap a new Fresh project. To do so, run this command:
```sh
deno create @fresh/init
deno run -Ar jsr:@fresh/init
```
Go to [https://fresh.deno.dev/](https://fresh.deno.dev/) for more information
+3 -3
View File
@@ -48,13 +48,13 @@ Initialize a new Fresh project. This will create all the necessary files
for a new project.
To generate a project in the './foobar' subdirectory:
${colors.rgb8("deno create @fresh/init ./foobar", 245)}
${colors.rgb8("deno run -Ar jsr:@fresh/init ./foobar", 245)}
To generate a project in the current directory:
${colors.rgb8("deno create @fresh/init .", 245)}
${colors.rgb8("deno run -Ar jsr:@fresh/init .", 245)}
${colors.rgb8("USAGE:", 3)}
${colors.rgb8("deno create @fresh/init [DIRECTORY]", 245)}
${colors.rgb8("deno run -Ar jsr:@fresh/init [DIRECTORY]", 245)}
${colors.rgb8("OPTIONS:", 3)}
${colors.rgb8("--force", 2)} Overwrite existing files
+1 -5
View File
@@ -2,11 +2,7 @@ import { parseArgs } from "@std/cli/parse-args";
import { initProject } from "./init.ts";
import { InitError } from "./init.ts";
// deno-lint-ignore no-console
console.warn(
"\x1b[33m%s\x1b[0m",
`Warning: "deno run -Ar jsr:@fresh/init" is deprecated. Use "deno create @fresh/init" instead.`,
);
// Note: "deno run -Ar jsr:@fresh/init" is the recommended way to create a new project.
const flags = parseArgs(Deno.args, {
boolean: ["force", "tailwind", "vscode", "docker", "help", "builder"],
+1 -1
View File
@@ -14,7 +14,7 @@ export function Hero() {
</h2>
<div class="mt-12 flex flex-wrap justify-center items-stretch md:justify-start gap-4">
<FancyLink href="/docs/getting-started">Get started</FancyLink>
<CopyArea code={`deno create @fresh/init`} />
<CopyArea code={`deno run -Ar jsr:@fresh/init`} />
</div>
</div>
<div class="md:col-span-2 flex justify-center items-end">