feat: remove fresh cli, do manifest generation in process (#223)

This commit removes the `fresh` cli, replacing it with a small bootstrap script,
and JIT generation of the manifest that happens in process during development.
This commit is contained in:
Luca Casonato
2022-06-14 09:39:38 +02:00
committed by GitHub
parent 844ded8cfd
commit 836cc24bdd
40 changed files with 362 additions and 730 deletions
+1 -6
View File
@@ -8,9 +8,4 @@ Start the project:
deno task start
```
After adding, removing, or moving a page in the `routes` or directory, or
adding, removing, or moving an island in the `islands` directory, run:
```
fresh manifest
```
This will watch the project directory and restart as necessary.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"tasks": {
"start": "deno run -A --watch main.ts & deno run -A ../../cli.ts manifest --watch"
"start": "deno run -A --watch=static/,routes/,islands/ dev.ts"
},
"importMap": "./import_map.json"
}
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/,islands/
import dev from "$fresh/dev.ts";
await dev(import.meta.url, "./main.ts");
+2 -2
View File
@@ -1,6 +1,6 @@
// DO NOT EDIT. This file is generated by `fresh`.
// DO NOT EDIT. This file is generated by fresh.
// This file SHOULD be checked into source version control.
// To update this file, run `fresh manifest`.
// This file is automatically updated during development when running `dev.ts`.
import * as $0 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
+1 -1
View File
@@ -6,7 +6,7 @@ export default function Home() {
return (
<div>
<p>
Welcome to `fresh`. Try update this message in the ./routes/index.tsx
Welcome to Fresh. Try update this message in the ./routes/index.tsx
file, and refresh.
</p>
<Counter start={3} />