diff --git a/README.md b/README.md index b1133d9..bd1614f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # domco -## A Minimal Full-Stack JavaScript Framework +## Minimal Full-Stack JavaScript ```bash npm create domco@latest diff --git a/apps/docs/src/server/components/Hero.tsx b/apps/docs/src/server/components/Hero.tsx index e4e6949..17991dc 100644 --- a/apps/docs/src/server/components/Hero.tsx +++ b/apps/docs/src/server/components/Hero.tsx @@ -3,7 +3,9 @@ import type { FC } from "hono/jsx"; export const Hero: FC = () => { return (
-

A Minimal Full-Stack JavaScript Framework

+

+ Minimal Full-Stack JavaScript +

); diff --git a/apps/docs/src/server/components/Layout.tsx b/apps/docs/src/server/components/Layout.tsx index 3488940..500b819 100644 --- a/apps/docs/src/server/components/Layout.tsx +++ b/apps/docs/src/server/components/Layout.tsx @@ -25,10 +25,7 @@ export const Layout: FC = ({ title, children, client }) => { /> {client.map((tags) => tags)} - + {title} diff --git a/apps/docs/src/server/content/_preview.md b/apps/docs/src/server/content/_preview.md index ccacd58..c388ec5 100644 --- a/apps/docs/src/server/content/_preview.md +++ b/apps/docs/src/server/content/_preview.md @@ -1,19 +1,13 @@ -```ts {1,8} +```js {1,5} import { html } from "client:page"; -export const handler = async (req: Request) => { - const { pathname } = new URL(req.url); - - if (pathname === "/") { - return new Response( - html, // bundled client application - { - headers: { "Content-Type": "text/html" }, - }, - ); - } - - return new Response("Not found", { status: 404 }); +export const handler = async (req) => { + return new Response( + html, // bundled client application + { + headers: { "Content-Type": "text/html" }, + }, + ); }; ``` @@ -27,10 +21,6 @@ domco turns your [Vite](https://vitejs.dev) project into a full-stack applicatio - Build time [prerendering](/tutorial#prerender) of static routes. - Standardized authoring experience across runtimes and deployment providers with [adapters](/deploy#adapters). -## Build with Web APIs - -Server-side JavaScript runtimes are standardizing on the Web [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) APIs. This makes it possible to write your app once and deploy it to a variety of different platforms using [adapters](/deploy#adapters). - ## Add a Framework, or don't One of the main goals of domco is to be able to create full-stack applications using vanilla JavaScript. With domco, it's easy to achieve the same developer experience as other frameworks that are based around a UI library, without having to pull in additional dependencies. By default, domco only bundles only the code you write, making it efficient and straightforward. @@ -39,6 +29,10 @@ If you need a UI framework, you can still use any [Vite plugin](https://vitejs.d domco is compatible with any server-side JavaScript framework that provides a web request handler taking a `Request` argument and returning a `Response`. Check out the [examples](/examples) to see how to use popular server frameworks with domco. +## Build with Web APIs + +Server-side JavaScript runtimes are standardizing on the Web [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) APIs. This makes it possible to write your app once and deploy it to a variety of different platforms using [adapters](/deploy#adapters). + ## Minimal Dependencies domco is [lightweight](https://npmgraph.js.org/?q=domco), relying solely on Vite as its dependency. This results in quick installation times, fast build and development processes, and a reduced risk of supply chain attacks. diff --git a/packages/domco/package.json b/packages/domco/package.json index 3e61cbd..c6d1e6f 100644 --- a/packages/domco/package.json +++ b/packages/domco/package.json @@ -1,6 +1,6 @@ { "name": "domco", - "description": "A Minimal Full-Stack JavaScript Framework", + "description": "Minimal Full-Stack JavaScript", "version": "2.1.2", "author": { "name": "Ross Robino", @@ -13,9 +13,11 @@ "homepage": "https://domco.robino.dev", "license": "MIT", "keywords": [ - "hono", "vite", - "vite-plugin" + "vite-plugin", + "SSR", + "SSG", + "vanilla-js" ], "type": "module", "engines": {