mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
chore: add monorepo tools (#9196)
This commit is contained in:
30
tools/utils/src/distribution.ts
Normal file
30
tools/utils/src/distribution.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { BUILD_CONFIG_TYPE } from '@affine/env/global';
|
||||
|
||||
import { PackageList, type PackageName } from './workspace.gen';
|
||||
|
||||
export const PackageToDistribution = new Map<
|
||||
PackageName,
|
||||
BUILD_CONFIG_TYPE['distribution']
|
||||
>([
|
||||
['@affine/admin', 'admin'],
|
||||
['@affine/web', 'web'],
|
||||
['@affine/electron', 'desktop'],
|
||||
['@affine/mobile', 'mobile'],
|
||||
['@affine/ios', 'ios'],
|
||||
['@affine/android', 'android'],
|
||||
]);
|
||||
|
||||
export const AliasToPackage = new Map<string, PackageName>([
|
||||
['admin', '@affine/admin'],
|
||||
['web', '@affine/web'],
|
||||
['desktop', '@affine/electron'],
|
||||
['electron', '@affine/electron'],
|
||||
['mobile', '@affine/mobile'],
|
||||
['ios', '@affine/ios'],
|
||||
['android', '@affine/android'],
|
||||
['server', '@affine/server'],
|
||||
['gql', '@affine/graphql'],
|
||||
...PackageList.map(
|
||||
pkg => [pkg.name.split('/').pop()!, pkg.name] as [string, PackageName]
|
||||
),
|
||||
]);
|
||||
Reference in New Issue
Block a user