News for hackers. Stuff that matters.
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @09:44AM (#32765422)
Hey folks, author of Fresh here. Very excited for this rather significant release. Happy to answer any questions you may have :)
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by jplhomer on Thursday September 08, 2022 @10:38AM (#32766222)
Terrific update! You resolved the only two pain points I'd experienced (`tw` template literal and JSX pragma stuff).

Out of curiosity: does the support for automatic JSX incur any startup or deployment penalty? I'd assumed Deno didn't have a "build step" per se, but maybe I'm mistaken.

Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @10:43AM (#32766321)
Nope, no startup penalty. It is just as performant as the classic JSX pragma. The actual JavaScript that is executed by the runtime is pretty much identical.
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by teebot on Thursday September 08, 2022 @12:57PM (#32768309)
I really want to try fresh together with edgedb. Any chance a builtin authentication will be added soon? Or is there a recipe to implement something like auth0?
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @07:21PM (#32773370)
One of the next releases will improve the plugin API to the point where authentication providers can be very easily added as plugins.
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by dmix on Thursday September 08, 2022 @10:50AM (#32766439)
How big is the “team” working on Fresh? Is there a primary product which it spawned off of (the demo website?)?
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @11:57AM (#32767455)
Yes, it was a tech demo for some internal projects. I maintain the framework itself, but a lot of the work in other parts of the Deno system (Deno Deploy, Deno CLI) that are related to Fresh are done by other folks on the team :)
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by cercatrova on Thursday September 08, 2022 @10:41AM (#32766280)
I'd be interested to see a more built in solution for Markdown and MDX, as with Astro or NextJS, since I've been mainly using either for blog type websites and I'd love to use Fresh as well.
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by MarkBennett on Thursday September 08, 2022 @01:24PM (#32768700)
It's my understanding that GFM is already easy to do, in fact there's an example of using it with Fresh in the fresh repository as it's used for the docs!

https://github.com/denoland/fresh/blob/main/www/routes/docs/...

Using MDX is a little trickier as the .mdx file needs to be compiled to a javascript file which is then interpretted. When running Deno yourself this isn't hard as you can use a dynamic import, but if you're planning on using Deno Deploy you'll be out of luck as it doesn't support dynamic imports currently.

https://github.com/denoland/fresh/issues/640

Deno Deploy has an open issue asking for support if you want to give it a star. ;)

https://github.com/denoland/deploy_feedback/issues/1

As a workaround, you can always setup a watcher and preprocess MDX files before deploying to Deno Deploy, but that seems against the spirit of what Fresh is trying to accomplish by getting rid of preprocessors.

Let me know if you figure out a way to get MDX on Deno Deploy working without precompile as I'd like to use it myself!

Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by gherkinnn on Thursday September 08, 2022 @11:35AM (#32767120)
Solid release! It fixes most of the rough edges I encountered.

Was Twind chosen to stay true to the "no build step" idea?

Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @11:55AM (#32767434)
Indeed it was :)
Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by pier25 on Thursday September 08, 2022 @11:07AM (#32766682)
Fresh is looking awesome Luca!

The only thing I'm missing to try it out is some sort of SASS support.

Re:Fresh 1.1 – Automatic JSX, plugins, DevTools, and more by lucacasonato on Thursday September 08, 2022 @11:56AM (#32767441)
This is actually something I am planning a plugin for, just like we have for Twind.