gitmyhub

electron-vue

JavaScript ★ 15k updated 4y ago ▣ archived

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.

A one-command boilerplate for building cross-platform desktop apps by combining Electron and Vue.js, with webpack, routing, state management, and testing all pre-configured.

JavaScriptElectronVue.jswebpackBabelESLintKarmaMochasetup: moderatecomplexity 3/5

electron-vue is a starter template — what developers call a "boilerplate" — for building desktop applications that combine Electron and Vue.js. Electron is the framework behind apps like Slack or VS Code that wraps a web app in a window so it can run on Windows, macOS, and Linux. Vue.js is a JavaScript framework for building the user interface. Wiring the two together by hand involves a lot of configuration; this project removes that step by giving you a working project skeleton you can scaffold in one command.

Under the hood, the boilerplate uses vue-cli for scaffolding and ships with webpack and vue-loader (with Hot Module Replacement, so changes show up live), Babel for ES6 support, and either electron-packager or electron-builder to bundle your finished app into installers. Common Vue plugins are pre-wired in, including axios for HTTP requests, vue-electron, vue-router for in-app navigation, and vuex for state management. Development tooling includes vue-devtools and devtron, ESLint with standard or airbnb-base style, unit tests with Karma and Mocha, and end-to-end tests with Spectron and Mocha. Configuration files for SemaphoreCI, AppVeyor, and Travis are included for automated builds, and the same code can also be built for the browser. Choices like which test runner, linter, and packager to use are picked interactively when you scaffold the project.

You would reach for electron-vue if you want to build a cross-platform desktop app and prefer Vue over React, and you would rather start from a working setup than configure Electron, webpack, and Vue yourself. Node 7 or higher is required, and yarn is the recommended package manager.

Where it fits