Skip to content

Commit

Permalink
docs: update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Sep 30, 2024
1 parent f106fac commit c952e6b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# domco

## A Minimal Full-Stack JavaScript Framework
## Minimal Full-Stack JavaScript

```bash
npm create domco@latest
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/src/server/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import type { FC } from "hono/jsx";
export const Hero: FC = () => {
return (
<section class="flex flex-col">
<h1>A Minimal Full-Stack JavaScript Framework</h1>
<h1>
Minimal <span class="whitespace-nowrap">Full-Stack</span> JavaScript
</h1>
<Npm />
</section>
);
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/src/server/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ export const Layout: FC<LayoutProps> = ({ title, children, client }) => {
/>
{client.map((tags) => tags)}
<link rel="icon" type="image/svg+xml" href="/circle.svg" />
<meta
name="description"
content="A Minimal Full-Stack JavaScript Framework."
/>
<meta name="description" content="Minimal Full-Stack JavaScript" />
<title>{title}</title>
</head>
<body class="tabular-nums">
Expand Down
30 changes: 12 additions & 18 deletions apps/docs/src/server/content/_preview.md
Original file line number Diff line number Diff line change
@@ -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" },
},
);
};
```

Expand All @@ -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.
Expand All @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions packages/domco/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand Down

0 comments on commit c952e6b

Please sign in to comment.