fix(init): revert init template to make init work again (#3530)
https://github.com/denoland/fresh/pull/3524 unfortunately introduced a regression in the init script which breaks it. This was caused by two independent problems: 1. Only files reachable in the module graph are published, meaning the templates itself weren't published to JSR 2. When publishing to JSR all specifiers become `https://` internally which breaks doing path operations like `path.resolve()`, `path.relative()` and all others. This is something that cannot be tested locally in advance Addressing these is going to require a bit of work. The quickest way to get init working again is to revert it.
This commit is contained in:
+6
-58
@@ -1,62 +1,10 @@
|
||||
# @fresh/init
|
||||
# Create a new Fresh project.
|
||||
|
||||
Template-based initialization system for Fresh projects.
|
||||
This is a CLI tool to bootstrap a new Fresh project. To do so, run this command:
|
||||
|
||||
## Usage
|
||||
|
||||
### CLI
|
||||
|
||||
```bash
|
||||
# Interactive mode
|
||||
deno run -Ar jsr:@fresh/init my-project
|
||||
|
||||
# With options
|
||||
deno run -Ar jsr:@fresh/init my-app --tailwind --vscode --docker
|
||||
```sh
|
||||
deno run -Ar jsr:@fresh/init
|
||||
```
|
||||
|
||||
**Options:**
|
||||
|
||||
- `--force` - Overwrite existing files
|
||||
- `--tailwind` - Include Tailwind CSS
|
||||
- `--vscode` - Add VS Code configuration
|
||||
- `--docker` - Add Docker support
|
||||
- `--builder` - Use builder instead of Vite
|
||||
- `--help` - Show help message
|
||||
|
||||
### Programmatic
|
||||
|
||||
```typescript
|
||||
import { initProject, resolveVersions } from "jsr:@fresh/init/src/init";
|
||||
|
||||
const versions = await resolveVersions();
|
||||
await initProject(Deno.cwd(), {
|
||||
directory: "./my-fresh-app",
|
||||
tailwind: true,
|
||||
vscode: true,
|
||||
docker: false,
|
||||
builder: false,
|
||||
force: false,
|
||||
}, versions);
|
||||
```
|
||||
|
||||
## Templates
|
||||
|
||||
**Build Systems:**
|
||||
|
||||
- **Vite** (default) - Modern build system with HMR
|
||||
- **Builder** - Traditional Deno-based build system
|
||||
|
||||
**Styling:**
|
||||
|
||||
- **Plain CSS** (default)
|
||||
- **Tailwind CSS** (`--tailwind`)
|
||||
|
||||
**Optional Features:**
|
||||
|
||||
- **VS Code** configuration (`--vscode`)
|
||||
- **Docker** support (`--docker`)
|
||||
|
||||
## Maintainer Documentation
|
||||
|
||||
See [DESIGN.md](./DESIGN.md) for architecture, maintenance workflows, and
|
||||
development setup.
|
||||
Go to [https://fresh.deno.dev/](https://fresh.deno.dev/) for more information
|
||||
about Fresh.
|
||||
|
||||
Reference in New Issue
Block a user