mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
chore: standardize tsconfig (#9568)
This commit is contained in:
1
packages/common/debug/.gitignore
vendored
1
packages/common/debug/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
lib
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"name": "@affine/debug",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": "^4.4.0"
|
||||
},
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"extends": "../../../tsconfig.web.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"sourceMap": true,
|
||||
"composite": true,
|
||||
"noEmit": false,
|
||||
"outDir": "lib"
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["node_modules"]
|
||||
"references": []
|
||||
}
|
||||
|
||||
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" }]
|
||||
}
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"extends": "../../../tsconfig.web.json",
|
||||
"include": ["./src"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"noEmit": false,
|
||||
"outDir": "lib"
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../env"
|
||||
},
|
||||
{
|
||||
"path": "../debug"
|
||||
}
|
||||
]
|
||||
"references": [{ "path": "../debug" }, { "path": "../env" }]
|
||||
}
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"extends": "../../../tsconfig.web.json",
|
||||
"include": ["./src"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"noEmit": false,
|
||||
"outDir": "lib"
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../../frontend/graphql"
|
||||
},
|
||||
{
|
||||
"path": "../infra"
|
||||
},
|
||||
{
|
||||
"path": "../../../blocksuite/affine/all"
|
||||
}
|
||||
]
|
||||
"references": [{ "path": "../infra" }, { "path": "../../frontend/graphql" }]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user