Skip to content

Commit c8486ca

Browse files
committed
fix workflows
1 parent ac75c6e commit c8486ca

File tree

6 files changed

+51
-61
lines changed

6 files changed

+51
-61
lines changed

.claude/settings.local.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- uses: pnpm/action-setup@v4
16-
with:
17-
version: 10.27.0
1816

1917
- uses: actions/setup-node@v4
2018
with:
@@ -27,7 +25,12 @@ jobs:
2725
- name: Build plugin
2826
run: pnpm build
2927

30-
- name: Build example
28+
- name: Build basic example
29+
run: |
30+
cd examples/basic
31+
pnpm build
32+
33+
- name: Build Vercel example
3134
run: |
32-
cd example
35+
cd examples/vercel
3336
pnpm build

.github/workflows/preview.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- uses: pnpm/action-setup@v4
20-
with:
21-
version: 10.27.0
2220

2321
- uses: actions/setup-node@v4
2422
with:

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
- uses: actions/checkout@v4
1515

1616
- uses: pnpm/action-setup@v4
17-
with:
18-
version: 10.27.0
1917

2018
- uses: actions/setup-node@v4
2119
with:

src/index.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import { srvx } from './srvx.js'
2-
3-
// Unified plugin (recommended)
4-
export { srvx, defaultSrvxOptions } from './srvx.js'
5-
export type { SrvxOptions } from './srvx.js'
1+
import { srvx } from "./srvx";
62

3+
export type { BuildOptions } from "./build";
4+
export { defaultBuildOptions, srvxBuild } from "./build";
5+
export type { ClientBuildOptions } from "./client-build";
6+
export { clientBuild, defaultClientBuildOptions } from "./client-build";
7+
export type { DevServerOptions } from "./dev-server";
78
// Individual plugins (for advanced use cases)
8-
export { devServer, defaultOptions } from './dev-server.js'
9-
export type { DevServerOptions } from './dev-server.js'
10-
export { clientBuild, defaultClientBuildOptions } from './client-build.js'
11-
export type { ClientBuildOptions } from './client-build.js'
12-
export { srvxBuild, defaultBuildOptions } from './build.js'
13-
export type { BuildOptions } from './build.js'
9+
export { defaultOptions, devServer } from "./dev-server";
10+
export type { SrvxOptions } from "./srvx";
11+
// Unified plugin (recommended)
12+
export { defaultSrvxOptions, srvx } from "./srvx";
1413

1514
// Default export is the unified plugin
16-
export default srvx
15+
export default srvx;

src/srvx.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
import type { Plugin } from 'vite'
2-
import { devServer, type DevServerOptions } from './dev-server.js'
3-
import { clientBuild } from './client-build.js'
4-
import { srvxBuild } from './build.js'
1+
import type { Plugin } from "vite";
2+
import { srvxBuild } from "./build";
3+
import { clientBuild } from "./client-build";
4+
import { type DevServerOptions, devServer } from "./dev-server";
55

66
export interface SrvxOptions extends DevServerOptions {
7-
// Build-specific options
8-
outDir?: string
9-
serverOutFile?: string
10-
framework?: 'vercel' // Target framework for deployment
7+
// Build-specific options
8+
outDir?: string;
9+
serverOutFile?: string;
10+
framework?: "vercel"; // Target framework for deployment
1111
}
1212

1313
export const defaultSrvxOptions: Partial<SrvxOptions> = {
14-
entry: './src/server.ts',
15-
outDir: 'dist',
16-
serverOutFile: 'server.js',
17-
}
14+
entry: "./src/server.ts",
15+
outDir: "dist",
16+
serverOutFile: "server.js",
17+
};
1818

1919
export function srvx(options?: SrvxOptions): Plugin[] {
20-
const mergedOptions = { ...defaultSrvxOptions, ...options }
20+
const mergedOptions = { ...defaultSrvxOptions, ...options };
2121

22-
return [
23-
// Development server plugin
24-
devServer({
25-
entry: mergedOptions.entry,
26-
exclude: mergedOptions.exclude,
27-
injectClientScript: mergedOptions.injectClientScript,
28-
loadModule: mergedOptions.loadModule,
29-
}),
22+
return [
23+
// Development server plugin
24+
devServer({
25+
entry: mergedOptions.entry,
26+
exclude: mergedOptions.exclude,
27+
injectClientScript: mergedOptions.injectClientScript,
28+
loadModule: mergedOptions.loadModule,
29+
}),
3030

31-
// Client build plugin
32-
clientBuild({
33-
outDir: mergedOptions.outDir,
34-
}),
31+
// Client build plugin
32+
clientBuild({
33+
outDir: mergedOptions.outDir,
34+
}),
3535

36-
// Server build plugin
37-
srvxBuild({
38-
entry: mergedOptions.entry,
39-
outDir: mergedOptions.outDir,
40-
serverOutFile: mergedOptions.serverOutFile,
41-
framework: mergedOptions.framework,
42-
}),
43-
]
36+
// Server build plugin
37+
srvxBuild({
38+
entry: mergedOptions.entry,
39+
outDir: mergedOptions.outDir,
40+
serverOutFile: mergedOptions.serverOutFile,
41+
framework: mergedOptions.framework,
42+
}),
43+
];
4444
}

0 commit comments

Comments
 (0)