├── .gitignore ├── README.md ├── app ├── index.html └── src │ ├── App.vue │ ├── assets │ ├── electron.png │ ├── vue.png │ └── webpack.png │ ├── components │ └── Hello.vue │ └── entry.js ├── main.js ├── package.json └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # electron-vue-webpack 2 | Got tired finding Electron/Vue2/Webpack2 templates with fancy add-ons you don't really need? 3 | 4 | Give a try to this minimal template with very few dependencies for quick development and prototyping. 5 | 6 |  7 | 8 | ## Install 9 | ``` bash 10 | # Clone the repository once 11 | $ git clone https://github.com/pastahito/electron-vue-webpack 12 | 13 | # Go into the repository (rename it as you wish) 14 | $ cd electron-vue-webpack 15 | 16 | # Install the 7 only dependencies once 17 | $ npm install 18 | ``` 19 | 20 | ## Usage 21 | Run this two commands in two different prompts to start developing with hot reloading. 22 | ``` bash 23 | # Webpack builds once and watches to apply only the changes 24 | $ npm run dev 25 | 26 | # Start you electron app 27 | $ npm start 28 | ``` 29 | 30 | ## What's included 31 | You don't really need more stuff to start playing around with Electron, Vue 2 and Webpack 2. 32 | 33 | - Support for .vue (single file components). Use them with HTML & ES6 & CSS. 34 | - No Express, neither Babel is needed (more than 97% ES6 is supported in Node/Electron). 35 | 36 | ## Template structure 37 | ``` 38 | ├── electron-vue-webpack/ # Your project's name 39 | 40 | ├── app/ 41 | 42 | ├── build/ # Webpack will bundle your css/js/img here 43 | 44 | ├── src/ 45 | 46 | ├── assets/ # Images go here 47 | ├── electron.png 48 | ├── vue.png 49 | ├── webpack.png 50 | 51 | ├── components/ # Webcomponents go here 52 | ├── Hello.vue 53 | 54 | ├── App.vue # Vue app. Your global css can go here 55 | ├── entry.js # App entry. Your global js can go here 56 | 57 | ├── index.html # Single Page Application HTML, it only uses build's files 58 | 59 | ├── main.js # Electron app init 60 | ├── package.json 61 | ├── webpack.config.js # Minimal webpack setup 62 | ``` 63 | 64 | ## Related 65 | - [electron-react-webpack](https://github.com/pastahito/electron-react-webpack) - 66 | Electron template using React instead of Vue 2. 67 | -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |8 | If you are trying to build Electron apps using Vue 2, or you just 9 | want to play around with them, feel free to use this 10 | seed as starting point. 11 |
12 |13 | Pay attention to how resources inside src/ folder are built, CSS code 14 | inside .vue components is embed into the HTML file when loaded, or 15 | simply relative image paths are updated to public paths after 16 | building with Webpack. 17 |
18 |19 | Here are the docs for 20 | 21 | Electron, 22 | 23 | Vue 2 and 24 | 25 | Webpack. 26 | Customize this template as you wish by adding any 27 | fancy tool you are used to. 28 |
29 |30 | If you have any issues, please 31 | file an issue at this seed's 32 | 33 | repository. 34 |
35 |