Skip to content

Commit

Permalink
remove dep and node/bun adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Sep 3, 2024
1 parent f9e5cd4 commit 418af75
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 218 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-steaks-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"domco": patch
---

Remove defu dependency, only used in a couple places where Object.assign works instead
5 changes: 5 additions & 0 deletions .changeset/slow-rice-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-domco": patch
---

Bump dependency versions
5 changes: 5 additions & 0 deletions .changeset/smooth-items-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"domco": minor
---

remove node/bun adapter, better to let user configure.
8 changes: 0 additions & 8 deletions apps/docs/src/content/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ export default defineConfig({
});
```

### Bun

The [Bun](https://bun.sh/) adapter runs your app using Bun's [HTTP server](https://bun.sh/docs/api/http).

### Node

The [NodeJs](https://nodejs.org/) adapter runs your app using `@hono/node-server`.

### Vercel

The Vercel adapter outputs your app to Vercel's [Build Output API](https://vercel.com/docs/build-output-api/v3) specification.
Expand Down
92 changes: 29 additions & 63 deletions apps/docs/src/generated/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ The name of the adapter.

<a id="run" name="run"></a>

##### run()
##### run()?

> **run**: () => `any`
> `optional` **run**: () => `any`
The script to run after Vite build is complete.

Expand All @@ -46,9 +46,9 @@ The script to run after Vite build is complete.

#### Defined in

[types/public/index.ts:12](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L12)
[types/public/index.ts:9](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L9)

---
***

<a id="adapterbuilderadapteroptions" name="adapterbuilderadapteroptions"></a>

Expand All @@ -70,9 +70,9 @@ The script to run after Vite build is complete.

#### Defined in

[types/public/index.ts:32](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L32)
[types/public/index.ts:29](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L29)

---
***

<a id="adapterentry" name="adapterentry"></a>

Expand All @@ -88,19 +88,15 @@ The script to run after Vite build is complete.

The app entrypoint to import `createApp` from.

**AdapterEntryOptions.port**: `number`

domco config port.

#### Returns

`Promise`\<`string`\> \| `string`

#### Defined in

[types/public/index.ts:4](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L4)
[types/public/index.ts:4](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L4)

---
***

<a id="client" name="client"></a>

Expand All @@ -118,9 +114,9 @@ domco config port.

#### Defined in

[types/public/index.ts:102](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L102)
[types/public/index.ts:92](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L92)

---
***

<a id="domcoconfig" name="domcoconfig"></a>

Expand All @@ -143,46 +139,18 @@ Pass the config into the `domco` vite plugin.
domco adapter.

Import from `"domco/adapter/..."`

Defaults to `undefined` - creates a NodeJS build only.

###### Default

```ts
undefined;
```

<a id="port" name="port"></a>

##### port?

> `optional` **port**: `object`
port numbers.

<a id="dev" name="dev"></a>

##### port.dev?

> `optional` **dev**: `number`
Defaults to `undefined` - creates a `app` build only.

###### Default

```ts
5173;
undefined
```

<a id="prod" name="prod"></a>

##### port.prod?

> `optional` **prod**: `number`
###### Default
###### Example

```ts
5173;
```js
import { adapter } from `"domco/adapter/...";`
```

#### Example
Expand All @@ -203,9 +171,9 @@ export default defineConfig({

#### Defined in

[types/public/index.ts:58](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L58)
[types/public/index.ts:55](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L55)

---
***

<a id="domcocontextvariablemap" name="domcocontextvariablemap"></a>

Expand Down Expand Up @@ -306,7 +274,7 @@ app.get("/", (c) => {
const page = c.var.page();
// gets `src/route/path/+page.html`
const differentPage = c.var.page("/route/path");
const differentPage = c.var.page("/route/path")
return c.html(page);
});
Expand Down Expand Up @@ -341,7 +309,7 @@ const app = new Hono();
app.get("/", (c) => {
// dev: fetch("http://localhost:5173/route/path")
// prod: fetch("https://example.com/route/path")
const res = await c.var.server("/route/path");
const res = await c.var.server("/route/path")
// ...
});
Expand All @@ -364,9 +332,9 @@ declare module "hono" {

#### Defined in

[types/public/index.ts:127](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L127)
[types/public/index.ts:117](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L117)

---
***

<a id="page-1" name="page-1"></a>

Expand All @@ -384,9 +352,9 @@ declare module "hono" {

#### Defined in

[types/public/index.ts:100](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L100)
[types/public/index.ts:90](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L90)

---
***

<a id="prerender" name="prerender"></a>

Expand All @@ -411,9 +379,9 @@ export const prerender: Prerender = ["/", "/post-1", "/post-2"];

#### Defined in

[types/public/index.ts:98](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L98)
[types/public/index.ts:88](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L88)

---
***

<a id="server-1" name="server-1"></a>

Expand All @@ -433,24 +401,22 @@ export const prerender: Prerender = ["/", "/post-1", "/post-2"];

#### Defined in

[types/public/index.ts:104](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/types/public/index.ts#L104)
[types/public/index.ts:94](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/types/public/index.ts#L94)

## Functions

<a id="domco" name="domco"></a>

### domco()

> **domco**(`config`?): `Promise`\<`Plugin`\<`any`\>[]\>
> **domco**(`domcoConfig`): `Promise`\<`Plugin`\<`any`\>[]\>

Creates domco Vite plugin, add to your `plugins` array within your `vite.config`
to start using domco.

#### Parameters

**config?**: [`DomcoConfig`](globals.md#domcoconfig)

Your domco config object.
**domcoConfig**: [`DomcoConfig`](globals.md#domcoconfig) = `{}`

#### Returns

Expand All @@ -472,4 +438,4 @@ export default defineConfig({

#### Defined in

[plugin/index.ts:32](https://github.com/rossrobino/domco/blob/ace4964b2e7e61fe17c6d21d874e42d9ef510772/packages/domco/src/plugin/index.ts#L32)
[plugin/index.ts:31](https://github.com/rossrobino/domco/blob/f9e5cd41cb34d2d4fa365d888bc01525b2cd5e89/packages/domco/src/plugin/index.ts#L31)
6 changes: 5 additions & 1 deletion apps/docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { defineConfig } from "vite";
export default defineConfig({
plugins: [
domco({
adapter: adapter(),
adapter: adapter({
config: {
runtime: "edge",
},
}),
}),
],
css: {
Expand Down
7 changes: 0 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/create-domco/src/template/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const versions = {
domco: "0.7.0",
hono: "4.5.9",
domco: "0.8.0",
hono: "4.5.11",
autoprefixer: "10.4.20",
prettier: "3.3.3",
prettierTailwind: "0.5.14",
Expand Down
9 changes: 0 additions & 9 deletions packages/domco/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./adapter/bun": {
"types": "./dist/adapter/bun/index.d.ts",
"default": "./dist/adapter/bun/index.js"
},
"./adapter/node": {
"types": "./dist/adapter/node/index.d.ts",
"default": "./dist/adapter/node/index.js"
},
"./adapter/vercel": {
"types": "./dist/adapter/vercel/index.d.ts",
"default": "./dist/adapter/vercel/index.js"
Expand Down Expand Up @@ -83,7 +75,6 @@
},
"dependencies": {
"@hono/node-server": "^1.12.2",
"defu": "^6.1.4",
"esbuild": "^0.23.1"
}
}
43 changes: 0 additions & 43 deletions packages/domco/src/adapter/bun/index.ts

This file was deleted.

Loading

0 comments on commit 418af75

Please sign in to comment.