Skip to content

Commit 66765aa

Browse files
committed
refactor: generalize features fixture
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 and removed vercel stuff from it.
1 parent b9f84e7 commit 66765aa

File tree

68 files changed

+209
-249
lines changed

Some content is hidden

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

68 files changed

+209
-249
lines changed
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/

fixtures/webstudio-features/.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
force=true
2+
loglevel=error
3+
audit=false
4+
fund=false
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.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)