Skip to main content

Scripts

Scripts must be run using the npm run command.

build

It generates the assets (JS, CSS…) for the production environment.
Files are generated in the out folder.

npm run build

compile

It runs the TypeScript compiler.
This script is executed by the CI system when a pull request is opened.

npm run compile

deadcode

It runs Knip to find dead code.
This script is executed by the CI system when a pull request is opened.

npm run deadcode

dev

Starts the application in development mode.
It automatically restarts the application when a file used by the main process or preload script is modified and HMR is enabled for the renderer process.

npm run dev

dev:cli

It builds and watches the CLI source code.
You can then use the bash script for you OS in the scripts to run the CLI.

npm run dev:cli

format

It formats the code using Prettier.
This script is executed by the CI system when a pull request is opened.

npm run format

i18n:extract

It extracts the strings to translate from the source code and generates the .po/.json files.
This script is executed by the CI system when a pull request is opened.

npm run i18n:extract

lint

It runs ESLint to find linting errors.
This script is executed by the CI system when a pull request is opened.

npm run lint

package

It packages the application into an executable file for the current platform and generates the installer.
You should run the build script before running this script.

npm run package

package:dir

It packages the application into an executable file for the current platform.
You should run the build script before running this script.

npm run package:dir

test

It runs the tests.

npm run test

test:watch

It runs the tests in watch mode.

npm run test:watch