mirror of
https://github.com/zadam/trilium.git
synced 2026-03-09 13:40:21 +01:00
Add --config, --help, and --version flags to edit-docs
- Implement --config (-c) flag to allow custom configuration file paths. - Add --help (-h) flag to display tool usage and available options. - Add --version (-v) flag to display the current Trilium version. - Update electron-start.mts to correctly pass command-line arguments to Electron. - Synchronize edit-docs version with the root package.json via update-version.ts. - Resolve config paths relative to the configuration file's directory. This makes edit-docs more robust and easier to use from external projects and immutable environments like Nix.
This commit is contained in:
@@ -3,7 +3,8 @@ import { getElectronPath, isNixOS } from "./utils.mjs";
|
||||
|
||||
const LD_LIBRARY_PATH = isNixOS() && execSync("nix eval --raw nixpkgs#gcc.cc.lib").toString("utf-8") + "/lib";
|
||||
|
||||
execSync(`${getElectronPath()} ${process.argv[2]} --no-sandbox`, {
|
||||
const args = process.argv.slice(2);
|
||||
execSync(`${getElectronPath()} ${args.join(" ")} --no-sandbox`, {
|
||||
stdio: "inherit",
|
||||
env: {
|
||||
...process.env,
|
||||
|
||||
@@ -26,7 +26,7 @@ function getVersion(packageJsonPath: string) {
|
||||
function main() {
|
||||
const version = getVersion(join(__dirname, "..", "package.json"));
|
||||
|
||||
for (const appName of ["server", "client", "desktop"]) {
|
||||
for (const appName of ["server", "client", "desktop", "edit-docs"]) {
|
||||
patchPackageJson(join(__dirname, "..", "apps", appName, "package.json"), version);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user