Skip to content

This is a full-fledge Vue 3 + Electron boilerplate to get you developing beautiful and responsive UI's in no time!

License

Notifications You must be signed in to change notification settings

AndrewR3K/electron-vue-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A full blown boilerplate for Vue 3 + Electron

Install dependencies ⏬

yarn install

Start developing

yarn run dev

Additional Commands

yarn run dev # starts application with hot reload
yarn run build # builds application

# OR
a
yarn run build:win # uses windows as build target
yarn run build:mac # uses mac as build target
yarn run build:linux # uses linux as build target

Optional configuration options can be found in the Electron Builder CLI docs.

Project Structure

- root
  - config/
    - vite.js # ViteJS configuration
    - electron-builder.json # Electron Builder configuration
  - scripts/ # all the scripts used to build or serve your application, change as you like.
  - src/
    - main/ # Main thread (Electron application source)
    - renderer/ # Renderer thread (VueJS application source)

Using static files

If you have any files that you want to copy over to the app directory after installation, you will need to add those files in your src/main/static directory.

Referencing static files from your main process

/* Assumes src/main/static/myFile.txt exists */

import {app} from 'electron';
import {join} from 'path';
import {readFileSync} from 'fs';

const path = join(app.getAppPath(), 'static', 'myFile.txt');
const buffer = readFileSync(path);

About

This is a full-fledge Vue 3 + Electron boilerplate to get you developing beautiful and responsive UI's in no time!

Topics

Resources

License

Stars

Watchers

Forks