mirror of
https://github.com/tutao/tutanota.git
synced 2025-12-08 06:09:50 +00:00
We use the REG command to manipulate/query the Windows registry. Also adds CommandExecutor so that we have a nice, unit-testable way to execute commands. Closes #9398
34 lines
971 B
JavaScript
34 lines
971 B
JavaScript
// Script which removes dependencies with binaries which raise F-Droid alarms.
|
|
|
|
import fs from "node:fs"
|
|
|
|
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf8"))
|
|
|
|
const devDependencies = [
|
|
"electron",
|
|
"electron-builder",
|
|
"electron-localshortcut",
|
|
"electron-packager",
|
|
"electron-updater",
|
|
"@electron/notarize",
|
|
"electron-rebuild",
|
|
"express",
|
|
"request",
|
|
"chokidar",
|
|
"body-parser",
|
|
"rcedit",
|
|
"node-forge",
|
|
]
|
|
for (const dep of devDependencies) {
|
|
delete packageJson.devDependencies[dep]
|
|
}
|
|
|
|
delete packageJson.scripts["postinstall"]
|
|
|
|
fs.writeFileSync("package.json", JSON.stringify(packageJson, null, "\t"))
|
|
|
|
// The project doesn't typecheck because removing dependencies also removes type definitions that are required by TS
|
|
// SO we just ignore that
|
|
const tsConfig = JSON.parse(fs.readFileSync("./tsconfig.json", "utf8"))
|
|
tsConfig.compilerOptions.noEmitOnError = false
|
|
fs.writeFileSync("./tsconfig.json", JSON.stringify(tsConfig, null, "\t"))
|