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:
+1
-5
@@ -13,8 +13,4 @@ Start the project:
|
||||
deno run -A --watch main.ts
|
||||
```
|
||||
|
||||
After adding, removing, or moving a page in the `pages` directory, run:
|
||||
|
||||
```
|
||||
fresh manifest
|
||||
```
|
||||
This will watch the project directory and restart as necessary.
|
||||
|
||||
@@ -7,10 +7,10 @@ export default function WarningBanner() {
|
||||
const warning = tw`bg-yellow-100 border(1 yellow-200) p-4 mb-4`;
|
||||
return (
|
||||
<div class={warning}>
|
||||
⚠️ Do not use `fresh` for production usecases yet, unless you are very
|
||||
actively tracking the `fresh` repository for updates. The framework is
|
||||
still undergoing very frequent core functionality changes. You can expect
|
||||
a mostly stable release very soon.
|
||||
⚠️ Do not use Fresh for production usecases yet, unless you are very
|
||||
actively tracking the Fresh repository for updates. The framework is still
|
||||
undergoing very frequent core functionality changes. You can expect a
|
||||
mostly stable release very soon.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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"
|
||||
}
|
||||
|
||||
Executable
+5
@@ -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
@@ -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/_render.ts";
|
||||
import * as $1 from "./routes/docs/[...slug].tsx";
|
||||
|
||||
+3
-11
@@ -160,21 +160,13 @@ function GettingStarted() {
|
||||
<a href="https://deno.land" class={tw`text-blue-600 hover:underline`}>
|
||||
Deno CLI
|
||||
</a>{" "}
|
||||
installed.
|
||||
version 1.23.0 or higher installed.
|
||||
</p>
|
||||
<p class={tw`text-gray-600`}>
|
||||
Then, run the following command to install the `fresh` CLI:
|
||||
Then you can use the Fresh init script to bootstrap a new project:
|
||||
</p>
|
||||
<pre class={tw`overflow-x-auto py-2 px-4 bg(gray-100)`}>
|
||||
deno install -A -f --no-check -n fresh -r
|
||||
https://raw.githubusercontent.com/lucacasonato/fresh/main/cli.ts
|
||||
</pre>
|
||||
<p class={tw`text-gray-600`}>
|
||||
Once installed, you can use the `fresh` command to bootstrap a new
|
||||
project:
|
||||
</p>
|
||||
<pre class={tw`overflow-x-auto py-2 px-4 bg(gray-100)`}>
|
||||
fresh init my-app
|
||||
{"deno run -A --no-check https://raw.githubusercontent.com/lucacasonato/fresh/main/init.ts my-app"}
|
||||
</pre>
|
||||
<p class={tw`text-gray-600`}>
|
||||
Enter the newly created project directory and run the following command
|
||||
|
||||
Reference in New Issue
Block a user