EML Docs

Set up environment

Before writing the user interface or connecting to your AdminTool, you need a working development environment. This guide will help you set up a basic Electron project with EML Lib.

Install Node.js

EML Lib v2 requires a modern version of Node.js to function correctly. You must install Node.js v20 (LTS) or higher. If you don’t have Node.js installed yet, follow the instructions below for your operating system.

Initialize the project

Before building your custom launcher, you need a working development environment. EML Lib provides two ways to get started: using our pre-configured template (recommended for beginners) or setting up the environment manually.

If you want to focus on the launcher logic and design immediately without configuring Webpack, Vite, or TypeScript manually, use our official starter kit: EML Template.

It comes pre-configured with:

  • Vite (ultra-fast build tool)
  • TypeScript (type safety)
  • SCSS (advanced styling)
  • Electron Builder (ready to package)

EML Template launcher

To get started:

  1. Go to the EML Template repository.

    Note

    You must have Git installed on your system. If you don’t have it yet, download it and follow the installation instructions.

    You should also have a GitHub account to create your own copy of the template.

  2. Click “Use this template” > “Create a new repository” to create a copy in your own GitHub account.

  3. Clone your new repository:

    # Replace YOUR_USERNAME with your GitHub username and my-launcher with your repository name
    git clone https://github.com/YOUR_USERNAME/my-launcher.git 
    cd my-launcher
  4. Install dependencies:

    npm install
  5. Change the EML AdminTool URL in electron/const.ts to point to your own EML AdminTool instance.

  6. Start the developer mode:

    npm run dev

You can now start customizing your launcher by following the Frontend architecture and further chapters.

Option 2: Set up the environment manually

Now, we need to install Electron, EML Lib, and the tools to bridge Vite and Electron.

Run the following commands:

# Install the core library
npm install eml-lib

# Install Electron, Builder, and Vite plugins as dev dependencies
npm install electron electron-builder vite-plugin-electron --save-dev

We now need to configure Vite to work with Electron.