@todesktop/config
v0.6.0
Published
Types for todesktop.config.ts, the config of an app ToDesktop builds, signs, releases and updates.
Readme
@todesktop/config
Types for todesktop.config.ts, the config of an app that ToDesktop builds,
signs, releases and updates.
npm install --save-dev @todesktop/configimport { defineConfig } from '@todesktop/config';
export default defineConfig({
appId: 'your-app-id',
productName: 'Your App',
description: 'What your app does',
maintainer: 'Your Company <[email protected]>',
linux: {
apps: { x64: 'dist/linux-x64' },
executable: 'your-app',
formats: ['deb', 'rpm', 'tar.gz'],
},
});defineConfig returns its argument unchanged: it gives your editor and
TypeScript the config's types, including errors for misspelled keys. ToDesktop's
upload action reads todesktop.config.ts itself, so uploads work with or
without this package; install it so your editor and any tsc run that includes
the file can resolve the import.
A Tauri app can start from what its own config says:
import { defineConfig, tauriConfig } from '@todesktop/config';
export default defineConfig({
extends: tauriConfig(), // src-tauri/tauri.conf.json and Cargo.toml
appId: 'your-app-id',
linux: { formats: ['deb'] },
});Presets such as tauriConfig() read your project when the upload action loads
todesktop.config.ts, on your CI machine; this package only declares them.
@todesktop/config/schema.json is the JSON Schema for a todesktop.config.json
with the same shape (no hooks).
Your ToDesktop dashboard has a config for your app, with your App ID filled in.
