Skip to content

frinyvonnick/electron-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

electron-start

electron-start is an electron boilerplate based on github electron-api-demos folder architecture.

Install

In your directory you can run

$ curl -fsSL https://github.com/frinyvonnick/electron-start/archive/master.tar.gz | tar -xz --strip-components 2

You can also git clone or download this repository.

Folder architecture

The folder architecture is based on electron-api-demos app from github. Here is a markdown document that explains in details this architecture.

All files in the folder src/main-process/listeners are automatically required in the application.

Features

Path aliases

module-alias lets you define alias for paths in your package.json.

A few are already defined:

alias path
src src
assets src/assets
windows src/windows
main-process src/main-process
renderer-process src/renderer-process

Livereload

nodemon watch files in src/main-process with the extension .js and reload your application if any change occurs.

Shorthand for creating windows

The file src/main-process/windows.js exports a method createWindow that facilitate create new windows.

It takes an object of options as parameter:

property type isRequired options
file string yes The path to a HTML file to inject in the new window
data object no This is an optional object that is injected in the renderer process as a global variable called __args__
options object no This is regular options for BrowserWindow's constructor

License

MIT © FRIN Yvonnick