/
githubmirror
/
marktext
Обзор
Документация
Войти
/
githubmirror
/
marktext
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v0.13.65
src/main/cli.js
34 строки
1 KB
Felix Häusler
Fix keybinding issues (#543)
06 ноя 2018, 19:16
06 ноя 2018, 19:16
5339ef6
Код
Авторство
О чём код?
import { app } from 'electron' import { dumpKeyboardInformation } from './keyboardUtils' for (const arg of process.argv) { if (arg === '--dump-keyboard-layout') { console.log(dumpKeyboardInformation()) process.exit(0) } else if (arg === '--debug') { global.MARKTEXT_DEBUG = true continue } else if (arg === '--safe') { global.MARKTEXT_SAFE_MODE = true continue } else if (arg === '--version') { console.log(`Mark Text: ${app.getVersion()} Node.js: ${process.versions.node} Electron: ${process.versions.electron} Chromium: ${process.versions.chrome} `) process.exit(0) } else if (arg === '--help') { console.log(`Usage: marktext [commands] [path] Available commands: --debug Enable debug mode --safe Disable plugins and other user configuration --dump-keyboard-layout Dump keyboard information --version Print version information --help Print this help message `) process.exit(0) } }