mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: standardize tsconfig (#9568)
This commit is contained in:
1
packages/common/env/.gitignore
vendored
1
packages/common/env/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
lib
|
||||
56
packages/common/env/src/global.ts
vendored
56
packages/common/env/src/global.ts
vendored
@@ -1,61 +1,5 @@
|
||||
import { UaHelper } from './ua-helper.js';
|
||||
|
||||
export type BUILD_CONFIG_TYPE = {
|
||||
debug: boolean;
|
||||
distribution: 'web' | 'desktop' | 'admin' | 'mobile' | 'ios' | 'android';
|
||||
/**
|
||||
* 'web' | 'desktop' | 'admin'
|
||||
*/
|
||||
isDesktopEdition: boolean;
|
||||
/**
|
||||
* 'mobile'
|
||||
*/
|
||||
isMobileEdition: boolean;
|
||||
|
||||
isElectron: boolean;
|
||||
isWeb: boolean;
|
||||
isMobileWeb: boolean;
|
||||
isIOS: boolean;
|
||||
isAndroid: boolean;
|
||||
isAdmin: boolean;
|
||||
|
||||
// this is for the electron app
|
||||
/**
|
||||
* @deprecated need to be refactored
|
||||
*/
|
||||
serverUrlPrefix: string;
|
||||
appVersion: string;
|
||||
editorVersion: string;
|
||||
appBuildType: 'stable' | 'beta' | 'internal' | 'canary';
|
||||
|
||||
githubUrl: string;
|
||||
changelogUrl: string;
|
||||
downloadUrl: string;
|
||||
// see: tools/workers
|
||||
imageProxyUrl: string;
|
||||
linkPreviewUrl: string;
|
||||
};
|
||||
|
||||
export type Environment = {
|
||||
// Variant
|
||||
isSelfHosted: boolean;
|
||||
|
||||
// Device
|
||||
isLinux: boolean;
|
||||
isMacOs: boolean;
|
||||
isIOS: boolean;
|
||||
isSafari: boolean;
|
||||
isWindows: boolean;
|
||||
isFireFox: boolean;
|
||||
isMobile: boolean;
|
||||
isChrome: boolean;
|
||||
isPwa: boolean;
|
||||
chromeVersion?: number;
|
||||
|
||||
// runtime configs
|
||||
publicPath: string;
|
||||
};
|
||||
|
||||
export function setupGlobal() {
|
||||
if (globalThis.$AFFINE_SETUP) {
|
||||
return;
|
||||
|
||||
14
packages/common/env/tsconfig.json
vendored
14
packages/common/env/tsconfig.json
vendored
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"include": ["./src"],
|
||||
"extends": "../../../tsconfig.web.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"noEmit": false,
|
||||
"outDir": "lib"
|
||||
}
|
||||
"types": ["build-config", "affine__env"],
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"include": ["./src"],
|
||||
"references": [{ "path": "../../../blocksuite/affine/all" }]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user