Commit Graph
35 Commits
Author SHA1 Message Date
Marvin Hagemeister 40181142d2 fix: ServerhandlerInfo type for newer Deno versions (#2419)
Newer Deno versions have an additional `completed` property in there.
This PR allows Fresh to be used with both old and newer Deno versions
without getting type errors.
2024-05-02 20:41:33 +02:00
Reed von Redwitz a83765efaa fix: no-window lint error (#2272)
Latest PR runs are failing with linting errors, e.g.
https://github.com/denoland/fresh/actions/runs/7625625084/job/20770308634?pr=2266

Maybe this shouldn't be happening like this right now, but we'll still
need to clean these up eventually.
2024-01-23 21:51:38 +01:00
Marvin Hagemeister 912f3782a3 feat: improve tailwind deployment flow (#2227)
By moving folks from `twind` over to the `tailwind` plugin we have
traded support questions about "how to get twind autocompletion
working?" with "my styles are not showing up in automatic mode". The
tailwind plugin has a hard requirement on having a build step. We have
documented this at various places and have a guide on how to set
everything up, but it's much better if we float those steps from Fresh
itself when we detect this.

With this PR we will prepare a `.github/workflows/deploy.yml` file
already where the user only needs to swap out the project name.

When Fresh is started in production mode, the tailwind plugin is active
and no snapshot files were loaded, then we print a helpful hint to the
console:

```sh
No pre-compiled tailwind styles found.

Did you forget to run "deno task build" prior to starting the production server?
```

When we are running inside Deno Deploy this PR goes one step further.
Since it is the first time many users might use Deno Deploy we'll also
show a simple page that shows how to finish the tailwind setup. I've
intentionally tried to not present this as a warning but rather as a
"finishing" step to avoid scaring users off. It's not the prettiest
page, but it's good enough for now.

<img width="892" alt="Screenshot 2024-01-09 at 23 41 27"
src="https://github.com/denoland/fresh/assets/1062408/9bf2a61b-5551-4d8e-bdf8-b498072f8e98">


Fixes https://github.com/denoland/fresh/issues/2223
2024-01-10 10:35:26 +01:00
Reed von Redwitz 60b2198d13 fix: tailwind now respects basepath (#2138) 2023-12-05 13:13:33 +01:00
Christian SvenssonandMarvin Hagemeister 96644f5e22 fix: remove error frame HTML for non-dev mode (#2133)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-12-04 11:14:11 +00:00
Reed von RedwitzandMarvin Hagemeister 9ab8651018 feat(server): Add basePath config to host from a directory (#2092)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-29 16:44:25 +00:00
Reed von RedwitzandMarvin Hagemeister ad33501692 chore: remove $fresh from import statements (#2079)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-28 16:43:50 +00:00
Marvin Hagemeister 9ee6ab72e0 fix: show original error page in dev (#2074) 2023-11-28 11:58:50 +01:00
Marvin Hagemeister bb035ae8da docs: port over to TailwindCSS (#2058) 2023-11-22 11:12:21 +01:00
Marvin Hagemeister daf15aee6f feat: add plugin configResolved (#2055) 2023-11-21 15:39:17 +01:00
Marvin HagemeisterandAdam Gregory 7ff2781fcd feat: allow plugins to modify HTML body (#2022)
Based on https://github.com/denoland/fresh/pull/1769 . Mostly added a
test.

---------

Co-authored-by: Adam Gregory <adam@aguilaengineering.com>
2023-11-10 13:59:41 +01:00
Adam GregoryandMarvin Hagemeister 264f3073bd Support AOT-built static assets (#1999)
Creates a static folder under `config.build.outDir` during AOT build.
Serves any static files that are found there.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-04 14:01:21 +01:00
Reed von Redwitz da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Asher Gomez 6ddef91d95 refactor: replace references of options with config (#1903) 2023-10-11 09:25:03 +02:00
Marvin Hagemeister b3a3bd1069 feat: add support for partial <head> merging (#1863) 2023-10-05 12:04:38 +02:00
Marvin Hagemeister 665d35bbc2 Add Partials (#1824) 2023-09-27 13:34:30 +02:00
Marvin Hagemeister 78606477ec fix: show marker confusion (#1823) 2023-09-26 11:54:36 +02:00
Marvin Hagemeister 3850131063 chore: speed up tests (#1791)
This PR speeds up tests by handling custom created `Requests` object
directly instead of binding a socket and making a real HTTP request. For
most tests this is fine, and for those that aren't the existing testing
methods are all preserved.
2023-09-18 18:44:22 +02:00
Marvin Hagemeister c76f15479f feat: add plugin buildStart and buildEnd hooks (#1770) 2023-09-18 17:46:34 +02:00
Luca Casonato 795836ed29 tests: de-flake tests and re-enable sanitizers (#1786) 2023-09-18 11:09:24 +02:00
Tomofumi ChibaandMarvin Hagemeister ec2f785455 fix: plugins not loaded with legacy dev (#1764)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-09-13 16:09:50 +02:00
Marvin Hagemeister 7004eae7ba fix: Missing error on invalid island children (#1736) 2023-09-05 15:15:48 +02:00
Marvin Hagemeister 6d5744861e fix: twind duplicating css when className is used (#1658) 2023-08-17 13:01:42 +02:00
Marvin Hagemeister 477364c567 feat: prebundle code + restore from snapshot (#1604) 2023-08-16 16:47:51 +02:00
Marvin Hagemeister 7ebaf0404d feat: allow layout and _app overrides (#1611) 2023-08-09 16:35:53 +00:00
Marvin Hagemeister e4d797ae4e feat: add support for route groups (#1563) 2023-08-02 09:51:20 +02:00
Marvin Hagemeister 813ee22574 chore: speed up layout tests (#1565) 2023-08-01 17:08:57 +02:00
Marvin Hagemeister 38d4b90091 fix: middleware state reset between middlewares (#1500) 2023-07-24 11:03:11 +02:00
Marvin Hagemeister 0fc6850d87 chore: make test more timing resilient (#1473) 2023-07-18 12:41:36 +02:00
Reed von Redwitz 9177d9afc3 feat: prevent duplicate routes when generating manifest (#1410) 2023-07-11 14:39:48 +02:00
Marvin Hagemeister ced2215446 chore: extract withPageName util (#1389) 2023-07-02 13:14:53 +02:00
Marvin Hagemeister 36d56a9878 feat(server): pick free port if none specified (#1274) 2023-06-12 13:18:52 +02:00
Marvin Hagemeister 69f4fecf5a feat(server): make startup message easier to see (#1273) 2023-06-12 10:42:17 +02:00
Marvin Hagemeister 48de711df4 chore(tests): don't cancel child process stream (#1262) 2023-06-09 13:44:11 +02:00
Marvin Hagemeister cd760b90d4 chore(test): extract shared start server code (#1250)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-06-05 18:52:22 +02:00