choje 5b81fff793 | il y a 1 an | |
---|---|---|
scripts | il y a 1 an | |
src | il y a 1 an | |
.gitignore | il y a 1 an | |
README.md | il y a 1 an | |
electron-builder.json | il y a 1 an | |
package-lock.json | il y a 1 an | |
package.json | il y a 1 an | |
postcss.config.js | il y a 1 an | |
tailwind.config.js | il y a 1 an | |
vite.config.js | il y a 1 an |
npm install
npm run dev
npm run dev # starts application with hot reload
npm run build # builds application, distributable files can be found in "dist" folder
# OR
npm run build:win # uses windows as build target
npm run build:mac # uses mac as build target
npm run build:linux # uses linux as build target
Optional configuration options can be found in the Electron Builder CLI docs.
- 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)
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.
/* 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);