mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
refactor(storybook): move to apps folder (#2901)
This commit is contained in:
+2
-2
@@ -9,6 +9,7 @@
|
||||
"server",
|
||||
"web",
|
||||
"docs",
|
||||
"storybook",
|
||||
"component",
|
||||
"workspace",
|
||||
"env",
|
||||
@@ -20,8 +21,7 @@
|
||||
"native",
|
||||
"templates",
|
||||
"y-indexeddb",
|
||||
"debug",
|
||||
"theme"
|
||||
"debug"
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ const allPackages = [
|
||||
'apps/web',
|
||||
'apps/server',
|
||||
'apps/electron',
|
||||
'apps/storybook',
|
||||
'plugins/copilot',
|
||||
'plugins/bookmark-block',
|
||||
];
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: storybook
|
||||
path: ./packages/storybook/storybook-static
|
||||
path: ./apps/storybook/storybook-static
|
||||
if-no-files-found: error
|
||||
|
||||
build-web:
|
||||
@@ -191,9 +191,9 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: storybook
|
||||
path: ./packages/storybook/storybook-static
|
||||
path: ./apps/storybook/storybook-static
|
||||
- name: Run storybook tests
|
||||
working-directory: ./packages/storybook
|
||||
working-directory: ./apps/storybook
|
||||
run: |
|
||||
yarn exec concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "yarn exec serve ./storybook-static -l 6006" "yarn exec wait-on tcp:6006 && yarn test"
|
||||
|
||||
@@ -232,7 +232,7 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: storybook
|
||||
path: ./packages/storybook/storybook-static
|
||||
path: ./apps/storybook/storybook-static
|
||||
|
||||
- name: Wait for Octobase Ready
|
||||
run: |
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
||||
PublicLinkDisableModal,
|
||||
StyledDisableButton,
|
||||
} from '@affine/component/share-menu';
|
||||
import { ShareMenu } from '@affine/component/share-menu/share-menu';
|
||||
import { ShareMenu } from '@affine/component/share-menu';
|
||||
import type {
|
||||
AffineLegacyCloudWorkspace,
|
||||
LocalWorkspace,
|
||||
@@ -2,17 +2,22 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["./src"],
|
||||
"compilerOptions": {
|
||||
// Workaround for storybook build
|
||||
"baseUrl": "../..",
|
||||
"composite": true,
|
||||
"noEmit": false,
|
||||
"outDir": "lib",
|
||||
"paths": {
|
||||
"@affine/component": ["../component/src"],
|
||||
"@affine/component/*": ["../component/src/components/*"]
|
||||
}
|
||||
"types": ["react/experimental"]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../component"
|
||||
"path": "../../packages/component"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/env"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/workspace"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
@@ -13,9 +13,9 @@
|
||||
"include": [".storybook/**/*"],
|
||||
"exclude": ["lib"],
|
||||
"references": [
|
||||
{ "path": "../i18n" },
|
||||
{ "path": "../../packages/i18n" },
|
||||
{
|
||||
"path": "../env"
|
||||
"path": "../../packages/env"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,8 @@
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "@emotion/react",
|
||||
"incremental": true,
|
||||
"experimentalDecorators": true
|
||||
"experimentalDecorators": true,
|
||||
"types": ["react/experimental"]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/types/types.d.ts"],
|
||||
"exclude": ["node_modules"],
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"{projectRoot}/node_modules/.cache",
|
||||
"{projectRoot}/target",
|
||||
"{workspaceRoot}/apps/web/.next",
|
||||
"{workspaceRoot}/packages/storybook/storybook-static",
|
||||
"{workspaceRoot}/apps/storybook/storybook-static",
|
||||
"{workspaceRoot}/packages/i18n/src/i18n-generated.ts",
|
||||
"{workspaceRoot}/packages/native/affine.*.node",
|
||||
"{workspaceRoot}/affine.db",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
"build:storybook": "nx build @affine/storybook",
|
||||
"build:plugins": "./apps/electron/scripts/plugins/build-plugins.mjs",
|
||||
"start:web": "yarn workspace @affine/web start",
|
||||
"start:storybook": "yarn exec serve packages/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",
|
||||
"lint": "eslint . --ext .js,mjs,.ts,.tsx --cache",
|
||||
"lint:fix": "yarn lint --fix",
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
{
|
||||
"path": "./apps/server"
|
||||
},
|
||||
{
|
||||
"path": "./apps/storybook"
|
||||
},
|
||||
// Top level packages
|
||||
{
|
||||
"path": "./packages/infra"
|
||||
|
||||
@@ -426,9 +426,9 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@affine/storybook@workspace:packages/storybook":
|
||||
"@affine/storybook@workspace:apps/storybook":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/storybook@workspace:packages/storybook"
|
||||
resolution: "@affine/storybook@workspace:apps/storybook"
|
||||
dependencies:
|
||||
"@affine/component": "workspace:*"
|
||||
"@affine/i18n": "workspace:*"
|
||||
|
||||
Reference in New Issue
Block a user