monorepo: ygo-deck + ygo-deck-server + ygo-sdk + ygo-card
- npm workspaces 整合前端(Umijs)/后端(NestJS)/SDK/卡片渲染 - 修复 typeorm mysql 驱动配置 - 移除 SSR(webpack4 incompatible with node22) - 修复 @/common → ygo-card 导入 - .umirc.ts 不含 src/common 依赖
This commit is contained in:
Generated
+29877
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -11,6 +11,9 @@
|
||||
"build": "npm run build:sdk && npm run build:server && npm run build:fe",
|
||||
"dev:server": "cd packages/ygo-deck-server && npm run start:dev",
|
||||
"dev:fe": "cd packages/ygo-deck && npm start",
|
||||
"install:all": "npm install"
|
||||
"install:all": "npm install",
|
||||
"postinstall": "cd packages/ygo-sdk && npm run build",
|
||||
"setup": "npm install && npm run postinstall",
|
||||
"start": "concurrently \"npm run dev:server\" \"npm run dev:fe\""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,16 @@ import { DeckStatisticsModule } from './deck-statistics/deck-statistics.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forRoot(),
|
||||
TypeOrmModule.forRoot({
|
||||
type: 'mysql',
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
username: 'root',
|
||||
password: '18032910ym',
|
||||
database: 'ygo',
|
||||
entities: [__dirname + '/**/*.entity{.ts,.js}'],
|
||||
synchronize: true,
|
||||
}),
|
||||
UserModule,
|
||||
DeckModule,
|
||||
DeckCommentModule,
|
||||
|
||||
@@ -46,10 +46,6 @@ export default defineConfig({
|
||||
antd: {
|
||||
dark: true,
|
||||
},
|
||||
ssr: {
|
||||
mode: 'string',
|
||||
},
|
||||
// mfsu: {},
|
||||
esbuild: {},
|
||||
extraBabelIncludes: [path.join(__dirname, '../ygo-core/src')],
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import { CardData } from 'ygo-card';
|
||||
import CardDetail from '@/components/card-detail';
|
||||
import CardList from '@/components/card-list';
|
||||
import './style.less';
|
||||
import { validates, core } from '@/common';
|
||||
import ygoCore from 'ygo-card'; const { validates, core } = ygoCore as any;
|
||||
import { Button, message, Alert } from 'antd';
|
||||
import { useIntl } from 'umi';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { CardData } from 'ygo-card';
|
||||
import { Deck, getDeckData, RelationType } from '@/server/model/deck/common';
|
||||
import { Button, message, Spin } from 'antd';
|
||||
import { updateUserDeck } from '@/server/model/deck/user';
|
||||
import { validates, core } from '@/common';
|
||||
import ygoCore from 'ygo-card'; const { validates, core } = ygoCore as any;
|
||||
import DeckEdit from '@/components/deck/deck-edit';
|
||||
import './style.less';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user