refactor: new project struct (#8199)
packages/frontend/web -> packages/frontend/apps/web packages/frontend/mobile -> packages/frontend/apps/mobile packages/frontend/electron -> packages/frontend/apps/electron
@@ -10,7 +10,7 @@ yarn install
|
||||
yarn workspace @affine/native build
|
||||
yarn dev
|
||||
|
||||
# in packages/frontend/electron
|
||||
# in packages/frontend/apps/electron
|
||||
yarn generate-assets
|
||||
yarn dev # or yarn prod for production build
|
||||
```
|
||||
@@ -61,7 +61,6 @@
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^11.0.0",
|
||||
"jotai": "^2.8.0",
|
||||
"jotai-devtools": "^0.10.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nanoid": "^5.0.7",
|
||||
"react": "^18.2.0",
|
||||
@@ -2,8 +2,8 @@
|
||||
"name": "@affine/electron",
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"root": "packages/frontend/electron",
|
||||
"sourceRoot": "packages/frontend/electron/src",
|
||||
"root": "packages/frontend/apps/electron",
|
||||
"sourceRoot": "packages/frontend/apps/electron/src",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "nx:run-script",
|
||||
@@ -30,8 +30,7 @@ import {
|
||||
getCurrentStore,
|
||||
LifecycleService,
|
||||
} from '@toeverything/infra';
|
||||
import type { PropsWithChildren, ReactElement } from 'react';
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { Suspense } from 'react';
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
|
||||
const desktopWhiteList = [
|
||||
@@ -55,19 +54,6 @@ if (
|
||||
const performanceI18nLogger = performanceLogger.namespace('i18n');
|
||||
const cache = createEmotionCache();
|
||||
|
||||
const DevTools = lazy(() =>
|
||||
import('jotai-devtools').then(m => ({ default: m.DevTools }))
|
||||
);
|
||||
|
||||
const DebugProvider = ({ children }: PropsWithChildren): ReactElement => {
|
||||
return (
|
||||
<>
|
||||
<Suspense>{process.env.DEBUG_JOTAI === 'true' && <DevTools />}</Suspense>
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const future = {
|
||||
v7_startTransition: true,
|
||||
} as const;
|
||||
@@ -115,19 +101,17 @@ export function App() {
|
||||
<AffineContext store={getCurrentStore()}>
|
||||
<Telemetry />
|
||||
<CustomThemeModifier />
|
||||
<DebugProvider>
|
||||
<GlobalLoading />
|
||||
<RouterProvider
|
||||
fallbackElement={<AppFallback />}
|
||||
router={router}
|
||||
future={future}
|
||||
/>
|
||||
{environment.isWindows && (
|
||||
<div style={{ position: 'fixed', right: 0, top: 0, zIndex: 5 }}>
|
||||
<WindowsAppControls />
|
||||
</div>
|
||||
)}
|
||||
</DebugProvider>
|
||||
<GlobalLoading />
|
||||
<RouterProvider
|
||||
fallbackElement={<AppFallback />}
|
||||
router={router}
|
||||
future={future}
|
||||
/>
|
||||
{environment.isWindows && (
|
||||
<div style={{ position: 'fixed', right: 0, top: 0, zIndex: 5 }}>
|
||||
<WindowsAppControls />
|
||||
</div>
|
||||
)}
|
||||
</AffineContext>
|
||||
</CacheProvider>
|
||||
</FrameworkRoot>
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.json",
|
||||
"extends": "../../../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"target": "ESNext",
|
||||
@@ -13,16 +13,16 @@
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../common/env"
|
||||
"path": "../../../../common/env"
|
||||
},
|
||||
{
|
||||
"path": "../../core"
|
||||
"path": "../../../core"
|
||||
},
|
||||
{
|
||||
"path": "../../component"
|
||||
"path": "../../../component"
|
||||
},
|
||||
{
|
||||
"path": "../../../common/infra"
|
||||
"path": "../../../../common/infra"
|
||||
}
|
||||
],
|
||||
"include": ["."],
|
||||
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 761 KiB After Width: | Height: | Size: 761 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 805 KiB After Width: | Height: | Size: 805 KiB |