Skip to content

Commit e8de913

Browse files
authored
refactor: generalize features fixture (#4820)
We have a fixture which is used for testing generated features. Historically we use it as vercel template fixture. Here migrated it to react-router, removed vercel stuff from it and renamed it to webstudio-features.
1 parent 870de38 commit e8de913

File tree

70 files changed

+210
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+210
-248
lines changed

.github/workflows/fixtures-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
# Testing fixtures for vercel template
5353
- name: Test cli --help flag
54-
working-directory: ./fixtures/webstudio-remix-vercel
54+
working-directory: ./fixtures/webstudio-features
5555
run: pnpm cli --help
5656

5757
- name: Testing cli link command

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
const results = [
136136
await assertSize('./fixtures/ssg/dist/client', 352),
137137
await assertSize('./fixtures/webstudio-remix-netlify-functions/build/client', 440),
138-
await assertSize('./fixtures/webstudio-remix-vercel/build/client', 926),
138+
await assertSize('./fixtures/webstudio-features/build/client', 926),
139139
]
140140
for (const result of results) {
141141
if (result.passed) {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
/node_modules/
3+
4+
# React Router
5+
/.react-router/
6+
/build/
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
force=true
2+
# to support using NODE_OPTIONS for windows tests
3+
shell-emulator=true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* We use mjs extension as constants in this file is shared with the build script
3+
* and we use `node --eval` to extract the constants.
4+
*/
5+
export const assetBaseUrl = "/assets/";
6+
7+
/**
8+
* @type {import("@webstudio-is/image").ImageLoader}
9+
*/
10+
export const imageLoader = ({ src }) => {
11+
return src;
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"dependencies": {
3+
"@webstudio-is/image": "workspace:*",
4+
"@webstudio-is/react-sdk": "workspace:*",
5+
"@webstudio-is/sdk": "workspace:*",
6+
"@webstudio-is/sdk-components-animation": "workspace:*",
7+
"@webstudio-is/sdk-components-react": "workspace:*",
8+
"@webstudio-is/sdk-components-react-radix": "workspace:*",
9+
"@webstudio-is/sdk-components-react-router": "workspace:*",
10+
"webstudio": "workspace:*"
11+
}
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"customConditions": ["webstudio"]
4+
}
5+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from "vite";
2+
// @ts-ignore
3+
import { reactRouter } from "@react-router/dev/vite";
4+
// @ts-ignore
5+
import { dedupeMeta } from "./proxy-emulator/dedupe-meta";
6+
7+
export default defineConfig({
8+
plugins: [reactRouter(), dedupeMeta],
9+
});
File renamed without changes.

0 commit comments

Comments
 (0)