Comprehensive boilerplate application for Electron runtime and Vue.js. This project is based on vue-templates/webpack and the awesome work by @szwacz on electron-boilerplate.
This README is a work in progress. This version is a large departure from the previous iteration. If you're looking for the old version, see this branch.
Scope of this project:
Note: Installer generation is currently NOT implemented. Once electron-builder stablizes, I will add that to the project.
The only development dependency of this project is Node.js. So just make sure you have it installed. Then type few commands known to every Node developer...
git clone https://github.com/bradstewart/electron-boilerplate-vue.git
cd electron-boilerplate-vue
npm install
npm start
... and boom! You have running desktop application on your screen.
There are two package.json
files:
Sits on path: electron-boilerplate-vue/package.json
. Here you declare dependencies for your development environment and build scripts. This file is not distributed with real application!
Also here you declare the version of Electron runtime you want to use:
"devDependencies": {
"electron-prebuilt": "^0.34.0"
}
Sits on path: electron-boilerplate-vue/app/package.json
. This is real manifest of your application. Declare your app dependencies here.
package.json
?devDependencies
need to be compiled against your locally installed node.js. Thanks to having two files this is trivial.devDependencies
. Here those are always not included (because reside outside the app
directory).app
- code of your application goes here.static
- static files which are not processed by webpack.build
- build scripts, configuration files, and resources.dist
- webpacked and runnable Electron app.releases
- ready for distribution installers and executables.test
- test configuration, runners, and specs.npm install
It will also download Electron runtime, and install dependencies for second package.json
file inside app
folder.
npm start
Remember to add your dependency to app/package.json
file, so do:
cd app
npm install name_of_npm_module --save
Note: There are various icon and bitmap files in the build/resources
directory. Those are used in installers and are intended to be replaced by your own graphics.
To make ready for distribution installer use command:
npm run release
This process uses electron-packager. See their documentation on packaging for various operating systems.
The MIT License (MIT)
Copyright (c) 2015 Jakub Szwacz, 2016 Brad Stewart
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.