forked from logseq/logseq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
capacitor.config.ts
47 lines (42 loc) · 1015 Bytes
/
capacitor.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { CapacitorConfig } from '@capacitor/cli'
import fs from 'fs'
const version = fs.readFileSync('static/package.json', 'utf8').match(/"version": "(.*?)"/)?.at(1) ?? '0.0.0'
const config: CapacitorConfig = {
appId: 'com.logseq.app',
appName: 'Logseq',
bundledWebRuntime: false,
webDir: 'public',
plugins: {
SplashScreen: {
launchShowDuration: 500,
launchAutoHide: false,
androidScaleType: 'CENTER_CROP',
splashImmersive: false,
backgroundColor: '#002b36'
},
Keyboard: {
resize: 'none'
}
},
android: {
appendUserAgent: `Logseq/${version} (Android)`
},
ios: {
scheme: 'Logseq',
appendUserAgent: `Logseq/${version} (iOS)`
},
cordova: {
staticPlugins: [
'@logseq/capacitor-file-sync', // AgeEncryption requires static link
]
}
}
if (process.env.LOGSEQ_APP_SERVER_URL) {
Object.assign(config, {
server: {
url: process.env.LOGSEQ_APP_SERVER_URL,
cleartext: true
}
})
}
export = config;