Commit Graph
25 Commits
Author SHA1 Message Date
Reed von Redwitz c8844ad98c fix: PluginRoute supports AsyncRoute and AsyncLayout (#2139) 2023-12-04 16:56:00 +01:00
Reed von RedwitzandMarvin Hagemeister b902205feb chore: bump std to 208 and deal with deprecations (#2081)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-28 16:35:26 +00:00
Reed von Redwitz 72edafde46 feat(server): plugins can create islands (#1472) 2023-11-22 11:19:13 +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 Gregory 14cecc0a6f Allow plugin render hooks to add link tags to the page (#1963)
Adds an extra optional property to plugin render results to allow
plugins to add `<link>` tags to the page.
2023-11-08 23:51:14 +01:00
Reed von Redwitz da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Marvin Hagemeister cbd5b842b0 feat: pass resolved config to plugin.buildStart() (#1961) 2023-10-19 17:25:16 +02:00
Asher Gomez 6ddef91d95 refactor: replace references of options with config (#1903) 2023-10-11 09:25:03 +02:00
Marvin Hagemeister 3db514f869 fix: plugin script error halting JS execution (#1801) 2023-09-20 12:28:32 +02:00
Marvin Hagemeister 3fd8fe89d3 feat: add build.outDir option (#1797) 2023-09-20 10:40:09 +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
Marvin Hagemeister 32ee75dee5 chore: fix wait for child process shutdown (#1777) 2023-09-15 13:02:44 +02:00
Reed von Redwitz cc0e2cb2ec chore(server): simplify plugin route creation (#1594) 2023-08-05 21:58:15 +02:00
Reed von Redwitz 21c72abecc fix(server): merge competing PluginMiddleware handlers together (#1545) 2023-07-31 13:56:38 +00:00
50db296fb7 feat(server): plugins can add middlewares and routes (#1455)
Co-authored-by: RoeHH <git@roeh.ch>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-07-13 11:26:07 +02:00
Lino Le VanandMarvin Hagemeister e2a1bf8643 feat: move to Deno.serve (#1427)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-07-12 14:37: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 894f56b9c9 chore(tests): use to spin up server (#1261) 2023-06-09 11:27:56 +02:00
Tom dd4e584a3e feat: async plugin rendering (#745)
An async render hook is added to plugins that enables injecting stylesheets and scripts based on the rendered HTML text.
2023-06-06 12:36:04 +02:00
Luca Casonato a6852fa58f feat: more advanced prop serializer for islands (#1224)
This commit adds support for an advanced (de)serializer that is used
for page state (island props and plugin state). This new serializer
supports maintaining references (thus supporting circular objects,
and multi-referenced objects).

This is a pre-requisite for allowing to pass signals, JSX, Uint8Arrays,
Date, and many other "advanced" values.
2023-05-31 10:12:07 +02:00
Sylvain CauandLuca Casonato 7e72fa236c refactor: remove deno.run (#1036)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-03-10 04:57:16 +09:00
Luca Casonato b12867a582 feat: support JSX automatic mode (#610)
This commit adds support for JSX automatic mode instead of the default
mode that requires the presence of the JSX pragma in each file.

This commit also adds the config file to the `fresh.gen.ts` manifest,
which is used to determine if the client emit should use automatic mode.

The minimum Deno version has also been bumped to 1.25.0.
2022-08-26 11:03:00 +02:00
Luca Casonato fd4e2bbe17 feat: add initial plugin support (#512)
This commit adds initial support for fresh "plugins". These are bundles
of functionality that can be added to a fresh plugin through a simple
addition in the `main.ts` file.

Right now plugins are only able to hook into the render steps. This
means that they can inject styling and scripts. They can not yet hook
into routing.

Things that I think should be possible now:
- styling integrations for twind, unocss, and probably a few other tools

Things that are not possible yet:
- google analytics middleware
- database connectors
- CMS connectors

The routing additions to plugins can be added in a follow-up though.
2022-08-09 21:27:58 +02:00