-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Content/release v0.27.0 blog post (#1009)
* first draft of v0.27.0 release blog post * home page content refresh * final blog post draft * home page banner punctuation * blog post image * adjust docs heading for experimental callout
- Loading branch information
1 parent
47ee8c7
commit 82c91bb
Showing
7 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
label: 'blog' | ||
title: v0.27.0 Release | ||
template: blog | ||
--- | ||
|
||
# Greenwood v0.27.0 | ||
|
||
**Published: November 23, 2022** | ||
|
||
## What's New | ||
|
||
Innovations in the industry like with [serverless and edge platforms](https://github.com/thescientist13/web-components-at-the-edge), combined with the emergence of [Web API based JavaScript runtimes](https://wintercg.org/), have been motivating the Greenwood team for a while now. In particular, how to make the experience of writing sites and applications more consistent across the entire stack, especially for web standards and Web Components. In our [last release](/blog/release/v0-26-0), we introduced [**Web Components Compiler (WCC)**](https://github.com/ProjectEvergreen/wcc), which made writing native Web Components for SSR even easier for developers, and enabled us to introduce our own innovation of [custom elements as pages](/blog/release/v0-26-0/#custom-elements-as-pages). | ||
|
||
![Full Stack Web Components](/assets/blog-images/full-stack-web-components.webp) Greenwood is ecstatic to embrace this future for the web, in which there is a world where dynamic can be just as practical as static, and the web can be all around you. With this release, Greenwood is able to deliver another step towards making sure it's just as easy to write a Web Component on the server, as it is in the browser; introducing _**Full Stack Web Components**_! ✨ | ||
|
||
<style> | ||
.gwd-content img { | ||
width: 30%!important; | ||
margin-left: 2%; | ||
float: right; | ||
} | ||
</style> | ||
|
||
Let's explore this concept through the first feature highlight of this release, _Custom Imports_. | ||
|
||
### Custom Imports | ||
|
||
While Greenwood has plugins to support using ESM for non standard module formats like CSS and JSON, these were only supported for client side (browser) based and bundling use cases. When we introduced SSR and custom elements as pages, trying to `import` a CSS file in a server route would break. But, no more! | ||
|
||
Starting with _.css_ and _.json_, you can now use native ESM to include these assets right into your SSR pages! | ||
|
||
```js | ||
// src/pages/index.js | ||
import packageJson from '../../package.json'; | ||
import css from '../main.css'; | ||
|
||
export default class Home extends HTMLElement { | ||
connectedCallback() { | ||
this.innerHTML = ` | ||
<head> | ||
<title>${packageJson.name}</title> | ||
<style> | ||
${css} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- ... --> | ||
</body> | ||
`; | ||
} | ||
} | ||
``` | ||
|
||
What's really neat is that there is no bundling going on, just a real time transformation from source format to ESM, using the NodeJS runtime! | ||
|
||
This currently depends on an experimental feature in NodeJS `v16.17.0`, so checkout our [documentation](/docs/server-rendering/#custom-imports) for full details and usage instructions. | ||
|
||
|
||
> _Before the Greenwood `v1.0.0` release, do we aim to align this syntax on the [**Import Assertions** spec](https://github.com/ProjectEvergreen/greenwood/issues/923), while also looking to support [additional formats](https://github.com/ProjectEvergreen/greenwood/issues/1004) like TypeScript._ | ||
### CSS Bundling and Minification | ||
|
||
One goal Greenwood had from the outset was to minimize as much as possible the reliance on external dependencies and third party libraries, choosing to [eschew the common trend of building a "meta" framework](https://projectevergreen.github.io/blog/always-bet-on-html/). It's this perspective that we feel classifies Greenwood better as a "workbench", and not a framework per se. Although **PostCSS** is an invaluable tool in the ecosystem, we felt that for what we were using it for (minification and bundling relative `@import` rules), Greenwood should be able to support this basic functionality itself. | ||
|
||
So that is what we did! From this release forward, all CSS minification and bundling will be done by Greenwood. Along with that, we have been able to drop two dependencies from our _package.json_. No need to change anything, it will happen automatically when you upgrade. And you can still use this with our [PostCSS plugin](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-postcss). | ||
|
||
> _If you do find any issues or regressions in the CSS output, please file a bug report and we will make sure to fix it ASAP!_ | ||
### Build Capacity | ||
|
||
The last highlight we would like to feature from this release was the introduction of thread pooling for static builds that rely on SSR based page generation, like when using the [`prerender` configuration option](/docs/configuration/#prerender). In adopting this [SSG benchmark](https://github.com/thescientist13/bench-framework-markdown), it was clear that without some work, Greenwood would not be able to build thousands of pages in this way, let alone quickly. | ||
|
||
So under the hood, Greenwood now introduces thread pooling to avoid crashing NodeJS through the spawning of too many Worker threads, based on our [_Getting Started_ repo](https://github.com/ProjectEvergreen/greenwood-getting-started). While it might not be the fastest, at least Greenwood will now be able handle the [thousands of pages](https://github.com/thescientist13/bench-framework-markdown) you may throw at it! 😅 | ||
|
||
|
||
## What's Next | ||
|
||
With another release complete, the Greenwood team already has its sights set on the next one. In keeping with our goal to make _**Full Stack Web Components**_ the best experience possible, we are looking to explore these key features and enhancements next. | ||
|
||
- [_NodeJS v18_](https://github.com/ProjectEvergreen/greenwood/issues/957) - This will bring native support for `fetch`, JSON Modules, and import assertions! We plan to make this the new minimum version. | ||
- _Standard and Conventions_ - Runtime wise, Greenwood would like to move in a direction less coupled to NodeJS ([agnostic runtime](https://github.com/ProjectEvergreen/greenwood/issues/1008)) by adopting a more web-centric based architecture and plugin model, leveraging standard [`Request` and `Response`](https://github.com/ProjectEvergreen/greenwood/issues/948) APIs. | ||
- [_API Routes_](https://github.com/ProjectEvergreen/greenwood/issues/1007) - We want to make `/api/*` routes happen in Greenwood! | ||
- As a project showcase, check out the recently launched **Tuesday's Tunes** [website](https://www.tuesdaystunes.tv/) and [repo](https://github.com/AnalogStudiosRI/www.tuesdaystunes.tv), built with Greenwood and WCC, leveraging Tailwind CSS, content and webhooks powered by Contentful, and built on Netlify! | ||
|
||
Thanks for reading! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters