closes https://github.com/denoland/fresh/issues/1338 This is more complex than first expected. It turns out the head of main no longer has this error, because we started swallowing errors in https://github.com/denoland/fresh/pull/1327. I'm not sure this is the right implementation. It seems like we should explicitly check for the `islands` folder instead of ignoring errors. But the obvious approach (https://deno.land/std@0.192.0/fs/mod.ts?s=exists) is apparently forbidden, due to some sort of nonsense with race conditions. Well, not being able to find `islands` because it doesn't exist at all is definitely different than it being buried in a source directory, so we'll need to sort this out at some point. I suppose that's now some technical debt to deal with, and not related to this issue. The latest "error" when running `update` and using a source directory is the following: ``` deno run -A -r file:///Users/reed/code/fresh/update.ts . The manifest has been generated for 0 routes and 0 islands. ``` i.e. it just doesn't do anything. (To be fair, it does generate a `fresh.gen.ts` in the incorrect location, so I suppose it does _something_.) But of course this isn't what we want. So we'll hunt for a source directory, as defined by the precense of `main.ts`. The fix for this is relatively straightforward. The test implements the user's actions, i.e. init a project, move things, and then try to update.
Documentation | Getting started | API Reference
fresh
Fresh is a next generation web framework, built for speed, reliability, and simplicity.
Some stand-out features:
- Just-in-time rendering on the edge.
- Island based client hydration for maximum interactivity.
- Zero runtime overhead: no JS is shipped to the client by default.
- No build step.
- No configuration necessary.
- TypeScript support out of the box.
- File-system routing à la Next.js.
📖 Documentation
The documentation is available on fresh.deno.dev.
🚀 Getting started
Install Deno CLI version 1.31.0 or higher.
You can scaffold a new project by running the Fresh init script. To scaffold a project run the following:
deno run -A -r https://fresh.deno.dev
Then navigate to the newly created project folder:
cd deno-fresh-demo
From within your project folder, start the development server using the
deno task command:
deno task start
Now open http://localhost:8000 in your browser to view the page. You make changes to the project source code and see them reflected in your browser.
To deploy the project to the live internet, you can use Deno Deploy:
- Push your project to GitHub.
- Create a Deno Deploy project.
- Link the Deno Deploy
project to the
main.tsfile in the root of the created repository. - The project will be deployed to a public $project.deno.dev subdomain.
For a more in-depth getting started guide, visit the Getting Started page in the Fresh docs.
Contributing
We appreciate your help! To contribute, please read our contributing instructions.
Adding your project to the showcase
If you feel that your project would be helpful to other fresh users, please consider putting your project on the showcase. However, websites that are just for promotional purposes may not be listed.
To take a screenshot, run the following command.
deno task screenshot [url] [your-app-name]
Then add your site to showcase.json, preferably with source code on GitHub, but not required.
Badges
[](https://fresh.deno.dev)
<a href="https://fresh.deno.dev">
<img
width="197"
height="37"
src="https://fresh.deno.dev/fresh-badge.svg"
alt="Made with Fresh"
/>
</a>
[](https://fresh.deno.dev)
<a href="https://fresh.deno.dev">
<img
width="197"
height="37"
src="https://fresh.deno.dev/fresh-badge-dark.svg"
alt="Made with Fresh"
/>
</a>