test: use static server (#2996)

This commit is contained in:
Alex Yang
2023-07-04 13:37:06 +08:00
committed by GitHub
parent 3d70148e0f
commit edb7847e95
2 changed files with 4 additions and 3 deletions

View File

@@ -4,8 +4,9 @@
"version": "0.7.0-canary.31", "version": "0.7.0-canary.31",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build && next export",
"start": "ts-node-esm server.mts" "start": "NODE_ENV=development next start",
"static-server": "ts-node-esm server.mts"
}, },
"dependencies": { "dependencies": {
"@affine-test/fixtures": "workspace:*", "@affine-test/fixtures": "workspace:*",

View File

@@ -23,7 +23,7 @@
"build:infra": "yarn nx run-many -t build -p plugin-infra infra", "build:infra": "yarn nx run-many -t build -p plugin-infra infra",
"build:plugins": "yarn nx run-many -t build -p @affine/bookmark-block", "build:plugins": "yarn nx run-many -t build -p @affine/bookmark-block",
"build:storybook": "yarn nx build @affine/storybook", "build:storybook": "yarn nx build @affine/storybook",
"start:web-static": "yarn workspace @affine/web start", "start:web-static": "yarn workspace @affine/web static-server",
"start:storybook": "yarn exec serve apps/storybook/storybook-static -l 6006", "start:storybook": "yarn exec serve apps/storybook/storybook-static -l 6006",
"serve:test-static": "yarn exec serve tests/fixtures --cors -p 8081", "serve:test-static": "yarn exec serve tests/fixtures --cors -p 8081",
"lint": "eslint . --ext .js,mjs,.ts,.tsx --cache", "lint": "eslint . --ext .js,mjs,.ts,.tsx --cache",