Skip to content

Commit a8abed5

Browse files
authored
add e2e:test script; add appPagesRouter test (#199)
1 parent c4d012d commit a8abed5

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

examples/sst/sst.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { SSTConfig } from "sst";
22

3+
import { AppPagesRouter } from "./stacks/AppPagesRouter";
34
import { AppRouter } from "./stacks/AppRouter";
45
import { PagesRouter } from "./stacks/PagesRouter";
56

@@ -11,6 +12,6 @@ export default {
1112
};
1213
},
1314
stacks(app) {
14-
app.stack(AppRouter).stack(PagesRouter);
15+
app.stack(AppRouter).stack(PagesRouter).stack(AppPagesRouter);
1516
},
1617
} satisfies SSTConfig;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NextjsSite } from "sst/constructs";
2+
3+
export function AppPagesRouter({ stack }) {
4+
const site = new NextjsSite(stack, "apppagesrouter", {
5+
path: "../app-pages-router",
6+
buildCommand: "npm run openbuild",
7+
bind: [],
8+
environment: {},
9+
});
10+
11+
stack.addOutputs({
12+
url: site.url,
13+
});
14+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"clean": "turbo run clean && rm -rf node_modules pnpm-lock.yaml",
1414
"lint": "eslint --ext .js,.ts,.tsx .",
1515
"lint:fix": "eslint --fix --ext .js,.ts,.tsx .",
16+
"e2e:test": "turbo run e2e:test",
1617
"version": "./.changeset/version",
1718
"release": "./.changeset/release",
1819
"release-snapshot": "./.changeset/snapshot"

0 commit comments

Comments
 (0)