├── .electron-vue ├── build.js ├── dev-client.js ├── dev-runner.js ├── webpack.main.config.js ├── webpack.renderer.config.js └── webpack.web.config.js ├── .gitignore ├── README.md ├── TODO.md ├── appveyor.yml ├── demo-img ├── 1001.png ├── 1002.png ├── 1003.png ├── 2001.png ├── 2002.png ├── 2003.png ├── 2004.png ├── 2005.png ├── 3001.png ├── 4001.png ├── 4002.png ├── 5001.png ├── 6001.png ├── 6002.png └── 6003.png ├── dist ├── electron │ └── .gitkeep └── web │ └── .gitkeep ├── gulpfile.js ├── help.md ├── i18n ├── config.js ├── languges_conf.js └── tap-i18n.json ├── package.json ├── src ├── datastore │ └── index.js ├── index.ejs ├── main │ ├── index.dev.js │ └── index.js └── renderer │ ├── App.vue │ ├── assets │ ├── .gitkeep │ ├── css │ │ ├── element-ui.css │ │ └── reset.scss │ └── logo.png │ ├── components │ ├── Account │ │ └── Account.vue │ ├── Contacts │ │ └── Contacts.vue │ ├── Header │ │ └── Header.vue │ ├── Home │ │ └── Home.vue │ ├── Setting │ │ └── Setting.vue │ └── Transfer │ │ └── Transfer.vue │ ├── i18n │ ├── af.json │ ├── am.json │ ├── ar.json │ ├── az.json │ ├── be.json │ ├── bg.json │ ├── bn.json │ ├── bs.json │ ├── ca.json │ ├── ceb.json │ ├── co.json │ ├── cs.json │ ├── cy.json │ ├── da.json │ ├── de.json │ ├── el.json │ ├── en.json │ ├── eo.json │ ├── es.json │ ├── et.json │ ├── eu.json │ ├── fa.json │ ├── fi.json │ ├── fr.json │ ├── fy.json │ ├── ga.json │ ├── gd.json │ ├── gl.json │ ├── gu.json │ ├── ha.json │ ├── haw.json │ ├── hi.json │ ├── hmn.json │ ├── hr.json │ ├── ht.json │ ├── hu.json │ ├── hy.json │ ├── id.json │ ├── ig.json │ ├── is.json │ ├── it.json │ ├── iw.json │ ├── ja.json │ ├── jw.json │ ├── ka.json │ ├── kk.json │ ├── km.json │ ├── kn.json │ ├── ko.json │ ├── ku.json │ ├── ky.json │ ├── la.json │ ├── lb.json │ ├── lo.json │ ├── lv.json │ ├── mg.json │ ├── mi.json │ ├── mk.json │ ├── ml.json │ ├── mn.json │ ├── mr.json │ ├── ms.json │ ├── mt.json │ ├── my.json │ ├── ne.json │ ├── nl.json │ ├── no.json │ ├── ny.json │ ├── pa.json │ ├── pl.json │ ├── ps.json │ ├── pt.json │ ├── ro.json │ ├── ru.json │ ├── sd.json │ ├── si.json │ ├── sk.json │ ├── sl.json │ ├── sm.json │ ├── sn.json │ ├── so.json │ ├── sq.json │ ├── sr.json │ ├── st.json │ ├── su.json │ ├── sv.json │ ├── sw.json │ ├── ta.json │ ├── te.json │ ├── tg.json │ ├── th.json │ ├── tl.json │ ├── tr.json │ ├── uk.json │ ├── ur.json │ ├── uz.json │ ├── vi.json │ ├── xh.json │ ├── yi.json │ ├── yo.json │ ├── zh-CN.json │ ├── zh-TW.json │ └── zu.json │ ├── main.js │ ├── router │ └── index.js │ └── store │ ├── index.js │ └── modules │ ├── Counter.js │ └── index.js ├── static ├── .gitkeep └── icons │ ├── 256x256.png │ ├── icon.icns │ ├── icon.ico │ └── logo.png └── web-read.md /.electron-vue/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | const { say } = require('cfonts') 6 | const chalk = require('chalk') 7 | const del = require('del') 8 | const { spawn } = require('child_process') 9 | const webpack = require('webpack') 10 | const Multispinner = require('multispinner') 11 | 12 | 13 | const mainConfig = require('./webpack.main.config') 14 | const rendererConfig = require('./webpack.renderer.config') 15 | const webConfig = require('./webpack.web.config') 16 | 17 | const doneLog = chalk.bgGreen.white(' DONE ') + ' ' 18 | const errorLog = chalk.bgRed.white(' ERROR ') + ' ' 19 | const okayLog = chalk.bgBlue.white(' OKAY ') + ' ' 20 | const isCI = process.env.CI || false 21 | 22 | if (process.env.BUILD_TARGET === 'clean') clean() 23 | else if (process.env.BUILD_TARGET === 'web') web() 24 | else build() 25 | 26 | function clean () { 27 | del.sync(['build/*', '!build/icons', '!build/icons/icon.*']) 28 | console.log(`\n${doneLog}\n`) 29 | process.exit() 30 | } 31 | 32 | function build () { 33 | greeting() 34 | 35 | del.sync(['dist/electron/*', '!.gitkeep']) 36 | 37 | const tasks = ['main', 'renderer'] 38 | const m = new Multispinner(tasks, { 39 | preText: 'building', 40 | postText: 'process' 41 | }) 42 | 43 | let results = '' 44 | 45 | m.on('success', () => { 46 | process.stdout.write('\x1B[2J\x1B[0f') 47 | console.log(`\n\n${results}`) 48 | console.log(`${okayLog}take it away ${chalk.yellow('`electron-builder`')}\n`) 49 | process.exit() 50 | }) 51 | 52 | pack(mainConfig).then(result => { 53 | results += result + '\n\n' 54 | m.success('main') 55 | }).catch(err => { 56 | m.error('main') 57 | console.log(`\n ${errorLog}failed to build main process`) 58 | console.error(`\n${err}\n`) 59 | process.exit(1) 60 | }) 61 | 62 | pack(rendererConfig).then(result => { 63 | results += result + '\n\n' 64 | m.success('renderer') 65 | }).catch(err => { 66 | m.error('renderer') 67 | console.log(`\n ${errorLog}failed to build renderer process`) 68 | console.error(`\n${err}\n`) 69 | process.exit(1) 70 | }) 71 | } 72 | 73 | function pack (config) { 74 | return new Promise((resolve, reject) => { 75 | webpack(config, (err, stats) => { 76 | if (err) reject(err.stack || err) 77 | else if (stats.hasErrors()) { 78 | let err = '' 79 | 80 | stats.toString({ 81 | chunks: false, 82 | colors: true 83 | }) 84 | .split(/\r?\n/) 85 | .forEach(line => { 86 | err += ` ${line}\n` 87 | }) 88 | 89 | reject(err) 90 | } else { 91 | resolve(stats.toString({ 92 | chunks: false, 93 | colors: true 94 | })) 95 | } 96 | }) 97 | }) 98 | } 99 | 100 | function web () { 101 | del.sync(['dist/web/*', '!.gitkeep']) 102 | webpack(webConfig, (err, stats) => { 103 | if (err || stats.hasErrors()) console.log(err) 104 | 105 | console.log(stats.toString({ 106 | chunks: false, 107 | colors: true 108 | })) 109 | 110 | process.exit() 111 | }) 112 | } 113 | 114 | function greeting () { 115 | const cols = process.stdout.columns 116 | let text = '' 117 | 118 | if (cols > 85) text = 'lets-build' 119 | else if (cols > 60) text = 'lets-|build' 120 | else text = false 121 | 122 | if (text && !isCI) { 123 | say(text, { 124 | colors: ['yellow'], 125 | font: 'simple3d', 126 | space: false 127 | }) 128 | } else console.log(chalk.yellow.bold('\n lets-build')) 129 | console.log() 130 | } 131 | -------------------------------------------------------------------------------- /.electron-vue/dev-client.js: -------------------------------------------------------------------------------- 1 | const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 2 | 3 | hotClient.subscribe(event => { 4 | /** 5 | * Reload browser when HTMLWebpackPlugin emits a new index.html 6 | * 7 | * Currently disabled until jantimon/html-webpack-plugin#680 is resolved. 8 | * https://github.com/SimulatedGREG/electron-vue/issues/437 9 | * https://github.com/jantimon/html-webpack-plugin/issues/680 10 | */ 11 | // if (event.action === 'reload') { 12 | // window.location.reload() 13 | // } 14 | 15 | /** 16 | * Notify `mainWindow` when `main` process is compiling, 17 | * giving notice for an expected reload of the `electron` process 18 | */ 19 | if (event.action === 'compiling') { 20 | document.body.innerHTML += ` 21 | 34 | 35 |