Skip to content

Latest commit

 

History

History
146 lines (105 loc) · 3.87 KB

File metadata and controls

146 lines (105 loc) · 3.87 KB

Getting started as developer

Digu uses the framework Svelte and SvelteKit for developing the web application, and uses Tauri which build a desktop app from the source for a web app.

Do the following steps/commands depending on what you want to do:

Run the following command to install the necessary dependencies:

npm install

Build web/desktop application for development using the following scripts.

  • For the WEB application:

    npm run dev

    This launches the development server and compiles the web application.

  • For the WEB and DESKTOP application:

    npm run tauri dev

    This works the same as npm run dev, plus compiles the desktop application.

Build web/desktop application for deployment using the following scripts.

  • For the WEB application:

    npm run build
  • For the WEB and DESKTOP application:

    npm run tauri build

    The deploy directories are:

    Application Path from the root
    Web ./_build
    Desktop ./src-tauri/target/release

Execute tests using the following scripts.

  • To run all unit tests:

    npm run vitest
  • To run all unit tests with coverage:

    npm run vitest:coverage
  • To run all unit tests and display their results on the UI with coverage:

    npm run vitest:ui
  • To run all E2E tests:

    npm run playwright-test

Perform quality checks and maintenance tasks:

  • To check the code and perform formatting:
    npm run check
  • To watch for changes and perform checks:
    npm run check:watch
  • To lint and format the code:
    npm run lint
    npm run format
  • To print out all the unused exports in the source files
    npm run find-deadcode

If you are curious about how your settings and event logs are sotred in the database, use developer tools to access and view them.


⚠ CAUTION ⚠
NEVER EDIT THE VALUES ON THE DATABASE with developer tools. It could cause Digu to stop working.


The Steps:

  1. Open the app
    Open Digu. Either the web/desktop app can be used.

  2. Open developer tools
    Press following keys to open developer tools:

    OS Pressing Keys
    Windows/Linux Ctrl + Shift + i
    macOS Cmd + Option + i
  3. Select the tab that displays IndexedDB

    Browser Tab Name
    Chrome/Edge Application
    Firefox Storage
  4. Access IndexedDB
    Look for Storage in the left panel, and click it to expand. Then you can see the database for Digu.
    All database names for Digu begin with Digu_.