Full Code of SimulatedGREG/electron-vue for AI

master 8d4ed607d653 cached
208 files
296.7 KB
99.5k tokens
28 symbols
1 requests
Download .txt
Showing preview only (338K chars total). Download the full file or copy to clipboard to get everything.
Repository: SimulatedGREG/electron-vue
Branch: master
Commit: 8d4ed607d653
Files: 208
Total size: 296.7 KB

Directory structure:
gitextract_mf9vvmtx/

├── .github/
│   └── ISSUE_TEMPLATE.md
├── .gitignore
├── LICENSE.md
├── README.md
├── book.json
├── docs/
│   ├── LANGS.md
│   ├── cn/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── en/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── debugging-production.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── ja/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── ko/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── debugging-production.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   └── pt_BR/
│       ├── README.md
│       ├── SUMMARY.md
│       ├── book.json
│       ├── building_your_app.md
│       ├── contributing.md
│       ├── development.md
│       ├── end-to-end_testing.md
│       ├── entry_indexhtml.md
│       ├── faqs.md
│       ├── file-tree.md
│       ├── getting_started.md
│       ├── global_configuration.md
│       ├── main-process.md
│       ├── meta.md
│       ├── migration-guide.md
│       ├── miscellaneous.md
│       ├── new-releases.md
│       ├── npm_scripts.md
│       ├── project_structure.md
│       ├── renderer-process.md
│       ├── savingreading-local-files.md
│       ├── testing.md
│       ├── unittesting.md
│       ├── using-electron-builder.md
│       ├── using-electron-packager.md
│       ├── using-static-assets.md
│       ├── using_css_frameworks.md
│       ├── using_pre-processors.md
│       ├── using_the_file_structure.md
│       ├── vue_accessories.md
│       └── webpack-configurations.md
├── meta.js
├── package.json
├── template/
│   ├── .babelrc
│   ├── .electron-vue/
│   │   ├── build.config.js
│   │   ├── build.js
│   │   ├── dev-client.js
│   │   ├── dev-runner.js
│   │   ├── webpack.main.config.js
│   │   ├── webpack.renderer.config.js
│   │   └── webpack.web.config.js
│   ├── .eslintignore
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── .travis.yml
│   ├── README.md
│   ├── appveyor.yml
│   ├── build/
│   │   └── icons/
│   │       └── icon.icns
│   ├── dist/
│   │   ├── electron/
│   │   │   └── .gitkeep
│   │   └── web/
│   │       └── .gitkeep
│   ├── package.json
│   ├── src/
│   │   ├── index.ejs
│   │   ├── main/
│   │   │   ├── index.dev.js
│   │   │   └── index.js
│   │   └── renderer/
│   │       ├── App.vue
│   │       ├── assets/
│   │       │   └── .gitkeep
│   │       ├── components/
│   │       │   ├── LandingPage/
│   │       │   │   └── SystemInformation.vue
│   │       │   └── LandingPage.vue
│   │       ├── main.js
│   │       ├── router/
│   │       │   └── index.js
│   │       └── store/
│   │           ├── index.js
│   │           └── modules/
│   │               ├── Counter.js
│   │               └── index.js
│   ├── static/
│   │   └── .gitkeep
│   └── test/
│       ├── .eslintrc
│       ├── e2e/
│       │   ├── index.js
│       │   ├── specs/
│       │   │   └── Launch.spec.js
│       │   └── utils.js
│       └── unit/
│           ├── index.js
│           ├── karma.conf.js
│           └── specs/
│               └── LandingPage.spec.js
└── tests/
    ├── builds/
    │   └── .gitkeep
    ├── builds.json
    ├── scaffold.js
    ├── scaffold.sh
    └── wine.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
#### Found an issue or bug with electron-vue? Tell me all about it!
Questions regarding how to use `electron` or `vue` are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities. 

##### Describe the issue / bug.
\#

##### How can I reproduce this problem?
\#

##### If visual, provide a screenshot.
\#

##### Tell me about your development environment.
  * Node version:
  * NPM version:
  * vue-cli version: (if necessary)
  * Operating System:

#### *If you are looking to suggest an enhancement or feature, then feel free to remove everything above.*


================================================
FILE: .gitignore
================================================
.idea
_book
thumbs.db
.DS_Store
node_modules
tests/builds/*
npm-debug.log
npm-debug.*.log
!.gitkeep


================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)

Copyright (c) 2016 Greg Holguin

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.


================================================
FILE: README.md
================================================
<div align="center">
<br>
<img width="500" src="/docs/images/logo.png" alt="electron-vue">
<br>
<br>
</div>

<p align="center" color="#6a737d">
The boilerplate for making electron applications built with vue (pretty much what it sounds like).
</p>

<div align="center">

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)
</div>

<div align="center">

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

[![Build Status](https://semaphoreci.com/api/v1/simulatedgreg/electron-vue/branches/master/badge.svg)](https://semaphoreci.com/simulatedgreg/electron-vue)
</div>

## Overview

The aim of this project is to remove the need of manually setting up electron apps using vue. electron-vue takes advantage of `vue-cli` for scaffolding, `webpack` with `vue-loader`, `electron-packager` or `electron-builder`, and some of the most used plugins like `vue-router`, `vuex`, and so much more.

#### Check out the detailed documentation [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

Things you'll find in this boilerplate...

* Basic project structure with a **single** `package.json` setup
* Detailed [documentation](https://simulatedgreg.gitbooks.io/electron-vue/content/)
* Project scaffolding using [vue-cli](https://github.com/vuejs/vue-cli)
* Ready to use Vue plugins \([axios](https://github.com/mzabriskie/axios), [vue-electron](https://github.com/SimulatedGREG/vue-electron), [vue-router](https://github.com/vuejs/vue-router), [vuex](https://github.com/vuejs/vuex)\)\*
* Installed [vue-devtools](https://github.com/vuejs/vue-devtools) and [devtron](https://github.com/electron/devtron) tools for development
* Ability to easily package your electron app using [electron-packager](https://github.com/electron-userland/electron-packager) or [electron-builder](https://github.com/electron-userland/electron-builder)\*
* `appveyor.yml` and `.travis.yml` configurations for automated deployments with [electron-builder](https://github.com/electron-userland/electron-builder)\*
* Ability to produce web output for browsers
* Handy [NPM scripts](https://simulatedgreg.gitbooks.io/electron-vue/content/en/npm_scripts.html)
* Use of [webpack](https://github.com/webpack/webpack) and [vue-loader](https://github.com/vuejs/vue-loader) with Hot Module Replacement
* Process restarting when working in main process
* HTML/CSS/JS pre-processor support with [vue-loader](https://github.com/vuejs/vue-loader/)
* ES6 with [`stage-0`](https://babeljs.io/docs/plugins/preset-stage-0/) by default
* Use of [`babili`](https://github.com/babel/babili) to remove the need of transpiling completely down to ES5
* ESLint \(with support for [`standard`](https://github.com/feross/standard) and [`airbnb-base`](https://github.com/airbnb/javascript)\)\*
* Unit Testing \(with Karma + Mocha\)\*
* End-to-end Testing \(with Spectron + Mocha\)\*

\*Customizable during vue-cli scaffolding

### Getting Started

This boilerplate was built as a template for [vue-cli](https://github.com/vuejs/vue-cli) and includes options to customize your final scaffolded app. The use of `node@^7` or higher required. electron-vue also officially recommends the [`yarn`](https://yarnpkg.org) package manager as it handles dependencies much better and can help reduce final build size with `yarn clean`.

```bash
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# Install dependencies and run your app
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

##### Are you a Windows User?

Make sure to check out [**A Note for Windows Users**](https://simulatedgreg.gitbooks.io/electron-vue/content/en/getting_started.html#a-note-for-windows-users) to make sure you have all the necessary build tools needed for electron and other dependencies.

##### Wanting to use Vue 1?

Just point to the `1.0` branch. Please note that electron-vue has officially deprecated the usage of `vue@^1`, so project structure, features, and documentation will reflect those changes ([**legacy documentation**](https://github.com/SimulatedGREG/electron-vue/tree/1.0/docs)).

```bash
vue init simulatedgreg/electron-vue#1.0 my-project
```

### Next Steps

Make sure to take a look at the [documentation](https://simulatedgreg.gitbooks.io/electron-vue/content/). Here you will find useful information about configuration, project structure, and building your app. There's also a handy [FAQs](https://simulatedgreg.gitbooks.io/electron-vue/content/en/faqs.html) section.


## Made with electron-vue
Take a look at some of the amazing projects built with electron-vue. Want to have your own project listed? Feel free add your project to the bottom of the list below then submit a pull request.

* [**Surfbird**](https://github.com/surfbirdapp/surfbird): A Twitter client built on Electron and Vue
* [**Lulumi-browser**](https://github.com/qazbnm456/lulumi-browser): Lulumi-browser is a light weight browser coded with Vue.js 2 and Electron
* [**Space-Snake**](https://github.com/ilyagru/Space-Snake): A Desktop game built with Electron and Vue.js.
* [**Forrest**](https://github.com/stefanjudis/forrest): An npm scripts desktop client
* [**miikun**](https://github.com/hiro0218/miikun): A Simple Markdown Editor
* [**Dakika**](https://github.com/raj347/Dakika): A minute taking application that makes writing minutes a breeze
* [**Dynamoc**](https://github.com/ieiayaobb/dynamoc): Dynamoc is a GUI client for dynamodb-local, dynalite and AWS dynamodb
* [**Dockeron**](https://github.com/dockeron/dockeron): A dockeron project, built on Electron + Vue.js for Docker
* [**Easysubs**](https://github.com/matiastucci/easysubs): Download subtitles in a very fast and simple way
* [**adminScheduler**](https://github.com/danieltoorani/adminScheduler): An application leveraging electron for cross platform compatibility, Vue.js for lightning fast UI and full-calendar.io to deliver a premium calendar interface.
* [**Backlog**](https://github.com/czytelny/backlog): Simple app for storing TODOs, ideas or backlog items. You can organize them with boards. Sleek flow. Built with Electron + Vue.js + iView
* [**Opshell**](https://github.com/ricktbaker/opshell): Ops tool to make life easier working with AWS instances.
* [**GitHoard**](https://github.com/jojobyte/githoard): Hoard git repositories with ease.
* [**Data-curator**](https://github.com/ODIQueensland/data-curator): Share usable open data.
* [**Bookmark**](https://github.com/mrgodhani/bookmark): Desktop app to manage bookmarked links using Atom Electron and Vue.js
* [**Uber Run**](https://github.com/break-enter/uberrun): Simple automation desktop app to download and organize your tax invoices from Uber.
* [**Apollo**](https://github.com/helados/Apollo): Convert YouTube videos (and more) to .mp3 files
* [**Netsix**](https://github.com/pulsardev/netsix): Share videos with your friends in a real peer-to-peer manner using WebRTC.
* [**code-notes**](https://github.com/lauthieb/code-notes): A simple code snippet manager for developers built with Electron & Vue.js.
* [**Pomotroid**](https://github.com/Splode/pomotroid): A simple and visually-pleasing Pomodoro timer
* [**MarkText**](https://github.com/marktext/marktext): Mark Text is a realtime Markdown Editor.
* [**vue-design**](https://github.com/L-Chris/vue-design): the best website visualization builder with Vue and Electron
* [**ImapSync Client**](https://github.com/ridaamirini/ImapSyncClient): It's only an Internet Message Access Protocol Synchronization Client
* [**Hve**](https://github.com/hellohve/hve): A static blog client tool you may like.
* [**MarkdownFox**](https://github.com/lx4r/markdownfox): A simple Markdown viewer with auto update and PDF export.
* [**Smart DOCSE**](https://github.com/shirshak55/smart-docse): A generic app which ability to display news, contact etc.
* [**Cleaver**](https://getcleaver.com/): Cleaver helps you provision servers ready for deploying your web apps with zero downtime - for free!
* [**XPanel**](https://github.com/krustnic/xpanel): XAMPP control panel alternative built with Electron & Vue.js
* [**Hexo-Client**](https://github.com/gaoyoubo/hexo-client): A hexo client powered by electron-vue.
* [**YT.Downloader**](https://github.com/myazarc/ytdownloader): Youtube Video Downloader&Converter and Play Music, built with Electron & Vue.js.
* [**BMFont-JS**](https://github.com/elisaday/bmfont-js): BMFont-js is a bitmap font generator, built with Electron & Vue.js.
* [**YouGet**](https://github.com/ahmetzeybek/YouGet): YouGet - YouTube Video/Playlist Downloader/Cutter - MP3 Converter
* [**Asar UI**](https://github.com/myazarc/AsarUI): UI for Asar Pack, built with Electron & Vue.js.
* [**Leeze**](https://github.com/dayinji/Leeze): A Receipt Record App, built with Electron & Vue.js.
* [**IntelTracker**](https://github.com/hectate/inteltracker): An intel item tracker for players/speedrunners of NOLF.
* [**Metube**](https://github.com/kimyearho/MeTube): A program to manage your simple YouTube music player and enjoy your music
* [**it-tools**](https://github.com/TsaiKoga/it-tools): A programing helper for developers built with Electron & Vue.js. 
* [**GifsWorld**](https://github.com/dj0nny/GifsWorld): Gifs finder built with Vue and Electron


================================================
FILE: book.json
================================================
{
  "root": "./docs",
  "plugins": [
    "edit-link",
    "theme-vuejs@git+https://github.com/pearofducks/gitbook-plugin-theme-vuejs.git",
    "github",
    "ga"
  ],
  "pluginsConfig": {
    "edit-link": {
      "base": "https://github.com/SimulatedGREG/electron-vue/tree/master/docs",
      "label": "Edit This Page"
    },
    "github": {
      "url": "https://github.com/SimulatedGREG/electron-vue"
    },
    "ga": {
      "token": "UA-64200901-3"
    }
  },
  "links": {
    "sharing": {
      "facebook": false,
      "twitter": true
    }
  }
}


================================================
FILE: docs/LANGS.md
================================================
* [English](en/)
* [日本語](ja/)
* [中文](cn/)
* [대한민국](ko/)
* [Português](pt_BR/)


================================================
FILE: docs/cn/README.md
================================================
![](../images/logo.png)

> 基于 vue (基本上是它听起来的样子) 来构造 electron 应用程序的样板代码。

[![Build Status](https://semaphoreci.com/api/v1/simulatedgreg/electron-vue/branches/master/badge.svg)](https://semaphoreci.com/simulatedgreg/electron-vue)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)

## 概要

该项目的目的,是为了要避免使用 vue 手动建立起 electron 应用程序。electron-vue 充分利用 `vue-cli` 作为脚手架工具,加上拥有 `vue-loader` 的 `webpack`、`electron-packager` 或是 `electron-builder`,以及一些最常用的插件,如`vue-router`、`vuex` 等等。


#### 在 [这里](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html) 查看其文档。

你会在本样板代码中找到的东西...

* 基本的项目结构与 **单一的** `package.json` 设置
* 详细的 [文档](https://simulatedgreg.gitbooks.io/electron-vue/content/)
* 使用 [vue-cli](https://github.com/vuejs/vue-cli) 作为项目脚手架
* 立即可用的 Vue 插件 \([axios](https://github.com/mzabriskie/axios), [vue-electron](https://github.com/SimulatedGREG/vue-electron), [vue-router](https://github.com/vuejs/vue-router), [vuex](https://github.com/vuejs/vuex)\)\*
* 预装开发工具 [vue-devtools](https://github.com/vuejs/vue-devtools) 和 [devtron](https://github.com/electron/devtron)
* 使用 [electron-packager](https://github.com/electron-userland/electron-packager) 或 [electron-builder](https://github.com/electron-userland/electron-builder) 轻松打包你的应用程序\*
* `appveyor.yml` 与 `.travis.yml` 配置用于 [electron-builder](https://github.com/electron-userland/electron-builder) 的自动部署\*
* 能够生成用于浏览器的网页输出
* 便利的 [NPM 脚本](/npm_scripts.md)
* 使用携带模块热更新 (Hot Module Replacement) 的 [webpack](https://github.com/webpack/webpack) 和 [vue-loader](https://github.com/vuejs/vue-loader)
* 在工作在 electron 的 `main` 主进程时重启进程
* 支持使用 [vue-loader](https://github.com/vuejs/vue-loader/) 的 HTML/CSS/JS 预处理器
* 默认支持 [`stage-0`](https://babeljs.io/docs/plugins/preset-stage-0/) 的 ES6
* 使用 [`babili`](https://github.com/babel/babili) 避免完全反编译到 ES5
* ESLint \(支持 [`standard`](https://github.com/feross/standard) 和 [`airbnb-base`](https://github.com/airbnb/javascript)\)\*
* 单元测试 \(使用 Karma + Mocha\)\*
* 端到端测试 \(使用 Spectron + Mocha\)\*

\* 在`vue-cli`脚手架中可定制

### 起步

该样板代码被构建为 [`vue-cli`](https://github.com/vuejs/vue-cli) 的一个模板,并且包含多个选项,可以自定义你最终的脚手架程序。本项目需要使用 `node@^7` 或更高版本。electron-vue 官方推荐 [`yarn`](https://yarnpkg.org) 作为软件包管理器,因为它可以更好地处理依赖关系,并可以使用 `yarn clean` 帮助减少最后构建文件的大小。

```bash
# 安装 vue-cli 和 脚手架样板代码
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# 安装依赖并运行你的程序
cd my-project
yarn # 或者 npm install
yarn run dev # 或者 npm run dev
```

##### 你是一个 Windows 用户?

请务必查看 [**Windows 用户注意事项**](https://simulatedgreg.gitbooks.io/electron-vue/content/en/getting_started.html#a-note-for-windows-users) 来确保你拥有 electron 和其他依赖关系所需的所有必要构建工具。

##### 希望使用 Vue 1?

只需指向 `1.0` 分支即可。请注意,electron-vue 已经正式废除了 `vue@^1` 的使用,因此,这些更改也同样会反映到项目结构、功能和文档上 \([**遗留文档**](https://github.com/SimulatedGREG/electron-vue/tree/1.0/docs)\)。

```bash
vue init simulatedgreg/electron-vue#1.0 my-project
```

### 下一步

请务必查看 [这个文档](https://simulatedgreg.gitbooks.io/electron-vue/content/)。在这里,你将找到有关项目配置、项目结构和构建应用程序的有用信息。这里还有一个方便的 [常见问题](https://simulatedgreg.gitbooks.io/electron-vue/content/en/faqs.html) 的部分。

## 基于 electron-vue 的作品

看看一些基于 electron-vue 建造的了不起的的项目。想要在此列出你自己的项目吗?请随时提交 pull 请求。

* [**Surfbird**](https://github.com/surfbirdapp/surfbird): 一个基于 Electron 和 Vue 的 Twitter 客户端
* [**Lulumi-browser**](https://github.com/qazbnm456/lulumi-browser): Lulumi-browser 是一个轻量级的浏览器,基于 Vue.js 2 和 Electron
* [**Space-Snake**](https://github.com/ilyagru/Space-Snake): 使用 Electron 和 Vue.js 构建的桌面游戏。
* [**Forrest**](https://github.com/stefanjudis/forrest): 一个 npm 脚本的桌面客户端
* [**miikun**](https://github.com/hiro0218/miikun): 一个简单的 Markdown 编辑器
* [**Dakika**](https://github.com/Madawar/Dakika): 超省时的应用程序,使写作变得轻而易举
* [**Dynamoc**](https://github.com/ieiayaobb/dynamoc): Dynamoc 是一个 dynamodb-local、 dynalite 和 AWS dynamodb 的图形化界面客户端
* [**Dockeron**](https://github.com/dockeron/dockeron): Dockeron 项目, 基于 Electron + Vue.js 的 Docker 桌面客户端
* [**Easysubs**](https://github.com/matiastucci/easysubs): 快速简单地下载字幕
* [**Data-curator**](https://github.com/ODIQueensland/data-curator):分享可用的開放數據。


================================================
FILE: docs/cn/SUMMARY.md
================================================
# 概要

* [简介](./README.md)
* [起步](getting_started.md)
* [项目结构](project_structure.md)
  * [文件树](file-tree.md)
  * [渲染器进程](renderer-process.md)
  * [主进程](main-process.md)
  * [Webpack 配置](webpack-configurations.md)
* [开发](development.md)
  * [入口 index.html](entry_indexhtml.md)
  * [Vue 插件](vue_accessories.md)
  * [NPM 脚本](npm_scripts.md)
  * [CSS 框架的使用](using_css_frameworks.md)
  * [预处理器的使用](using_pre-processors.md)
  * [静态资源的使用](using-static-assets.md)
  * [读写本地文件](savingreading-local-files.md)
* [建立你的应用](building_your_app.md)
  * [electron-packager 的使用](using-electron-packager.md)
  * [electron-builder 的使用](using-electron-builder.md)
* [测试](testing.md)
  * [单元测试](unittesting.md)
  * [端到端测试](end-to-end_testing.md)
* [更多](meta.md)
  * [常见问题](faqs.md)
  * [新版本](new-releases.md)
  * [迁移指南](migration-guide.md)
  * [贡献](contributing.md)


================================================
FILE: docs/cn/book.json
================================================
{
  "root": ""
}


================================================
FILE: docs/cn/building_your_app.md
================================================
# 构建你的应用程序

electron-vue 支持使用 [electron-packager](https://github.com/electron-userland/electron-packager) 和 [electron-builder](https://github.com/electron-userland/electron-builder) 来构建和分发你的产品阶段的程序。两个构建工具都由了不起的 [@electron-userland](https://github.com/electron-userland) 社区支持,每个都有详尽的文档。在 `vue-cli` 脚手架过程中,你会被问到你想要使用哪个构建器。

## [`electron-packager`](using-electron-packager.md)

如果你刚开始制作 electron 应用程序或只需要创建简单的可执行文件,那么 `electron-packager` 就可以满足你的需求。

## [`electron-builder`](using-electron-builder.md)

如果你正在寻找完整的安装程序、自动更新的支持、使用 Travis CI 和 AppVeyor 的 CI 构建、或本机 node 模块的自动重建,那么你会需要 `electron-builder`。


================================================
FILE: docs/cn/contributing.md
================================================
# 贡献

想要贡献你的力量?随时提交 pull 请求。在准备提交任何内容之前,请务必查看以下内容...

### JavaScript 标准规范

为确保所有 JS 代码遵循基本的 ***风格标准***,请务必遵循这些 [规则](http://standardjs.com/#rules)。

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)


================================================
FILE: docs/cn/development.md
================================================
# 开发

### 开始开发环境设置

在你使用 `yarn` 或 `npm install` 安装了依赖之后, 运行...

```bash
yarn run dev # 或者 npm run dev
```

...然后 轰! 现在,你就在运行一个 electron-vue 应用程序.
![](../images/landing-page.jpg)

此样板代码附带了几个易于移除的登录页面组件。


================================================
FILE: docs/cn/end-to-end_testing.md
================================================
# 端对端测试

对于端到端测试,electron-vue 使用 [Spectron](http://electron.atom.io/spectron/) 和 测试框架 [Mocha](https://mochajs.org/) \(以及 [Chai](http://chaijs.com/)\)。Mocha 和 Chai 的 API (包括 `expect`、`should` 以及 `assert` 在内) 均在全局范围内可用。

### 运行测试

```bash
# 开始 Mocha
npm run e2e
```

##### 注意

在运行端到端测试之前,为了使 Spectron 在测试的时候可用,请调用 `npm run pack` 来创建一个产品构建。

### 文件结构

```
my-project
├─ test
|  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ utils.js
```

**在大多数情况下,你可以忽略** `index.js` **,只专注于编写** `specs/` **。**

#### `specs/`

这个目录里面是编写实际测试代码的地方。由于 `babel-register` 的强大功能,你可以完全依照 ES2015 进行编写。

#### `index.js`

这是 Mocha 入口文件,并收集加载在 `specs/` 内的所有测试代码用于测试。

#### `utils.js`

在这里,你会发现一些通用的函数,你可以在 `specs/` 中使用。其基本功能包括处理 electron 创建/销毁过程的 `beforeEach` 和 `afterEach`。

### 关于 Spectron

Spectron 是使用 [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) 和 [WebDriverIO](http://webdriver.io/) 来操作 DOM 元素的 [electron](http://electron.atom.io) 官方测试框架。

#### WebDriverIO 的使用

如 Spectron 的 [文档](https://github.com/electron/spectron#client) 中所述,你可以通过访问 `this.app.client` 来访问 [WebDriverIO APIs](http://webdriver.io/api.html)。 由于 electron-vue 使用了 Mocha,`this` 在 `afterEach`、`beforeEach` 和 `it` 之间共享。 因此,值得注意的是,ES2015 的 箭头函数 (arrow function) 不能在某些情况下使用,因为 `this` 的语境将被覆盖 \([更多信息](https://mochajs.org/#arrow-functions)\)。


================================================
FILE: docs/cn/entry_indexhtml.md
================================================
# 入口 `index.html`

在产品阶段,electron-vue 使用 [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-plugin) 创建 `index.html`。在开发过程中,你将在 `src/` 目录中找到一个 `index.ejs`。在这里,你可以更改 HTML 入口文件。

如果你不熟悉这个插件的工作原理,那么我鼓励你看看它的 [文档](https://www.npmjs.com/package/html-webpack-plugin)。简而言之,这个插件会自动将产品阶段的资源(包括 `renderer.js` 和 `styles.css`)注入到最终压缩版的 `index.html` 中。

### 开发阶段的 `index.ejs`

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <%= ... %>
  </head>
  <body>
    <div id="app"></div>
    <!-- webpack 的构建会被自动注入 -->
  </body>
</html>
```

### 产品阶段的 `index.html` \(非压缩版\)

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>app</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div id="app"></div>
    <script type="text/javascript" src="renderer.js"></script>
  </body>
</html>
```

### 关于 CDNs 的使用

虽然使用 CDN 提供的资源有益于你的应用程序的最终版本的大小,但我建议不要使用它们。主要原因是,通过这样做,你其实是在假设你的应用程序始终可以访问互联网,而 Electron 应用程序并不总是如此。这成为使用 CSS 框架(如 bootstrap)的一个相当重要的问题,因为没有互联网,你的应用程序将迅速变得没有任何样式并且乱七八糟。

> “我不在乎,我还是想用CDN。”

如果你坚持使用 CDN,那么你仍可以通过将标签添加到 `src/index.ejs` 文件中达到目的。只是当你的应用程序处于离线模式时,请确保设置适当的 UI/UX 流程。


================================================
FILE: docs/cn/faqs.md
================================================
# 常见问题

* [为什么运行 `npm run dev` 之后我的 electron 应用程序是空白的?](#why-is-my-electron-app-blank-after-running-npm-run-dev)
* [为什么我的 electron 程序显示了文件浏览器?](#why-does-my-electron-app-show-a-file-explorer)
* [为什么没有 `vue-devtools` 或 `devtron`?](#why-is-vue-devtoolsdevtron-missing)
* [在哪里放置我的静态资源?](#where-do-i-put-static-assets)
* [为什么 `npm run lint` 会出现错误?](#why-did-npm-run-lint-end-with-an-error)
* [为什么我无法在网页浏览器中加载应用程序?](#why-cant-i-load-my-app-in-a-web-browser)
* [如何导入 `jquery`?](#how-do-import-jquery)
* [如何调试 `main` 进程?](#how-can-i-debug-the-main-process)

---

## 为什么运行 `npm run dev` 之后我的 electron 程序是空白的?

#### 简要

请确认你没有设置可能篡改 `webpack-dev-server` 的个人 **代理**。

## 为什么我的 electron 程序显示了文件浏览器?

#### 简要

你的 `src/renderer` 包含错误。请检查 控制台 (console),修复错误,然后用 `CommandOrControl+R` 刷新 electron。

##### 详述

如果你的 `src/renderer` 中出现错误,则会在首次运行时与 ESLint 产生冲突。接着,一个无效的 webpack 的 `renderer.js` 会被生成出来,它会打断 `HtmlWebpackPlugin` 创建 `index.html`。由于 `webpack-dev-server` 没有 `index.html` 可以提供服务,所以服务器失败,程序返回到文件浏览器。

## 为什么没有 `vue-devtools` 或 `devtron`?

如果缺少 `vue-devtools` 或 `devtron`,请确保首次启动时,关闭并重新打开开发者工具面板。另外,请检查你的终端,检查是否在安装过程中有任何可能的错误消息。

## 在哪里放置我的静态资源?

[**静态资源的使用**](using-static-assets.md)

## 为什么 `npm run lint` 会出现错误?

eslint 的默认属性是将控制台的错误打印出来,如果发现脚本以非零值退出结束时 \(它会产生 npm 错误\)。这是正常的行为。

## 为什么我无法在网页浏览器中加载应用程序?

[\#195](https://github.com/SimulatedGREG/electron-vue/issues/195)

## 如何导入 `jquery`?

如果你想使用 `bootstrap`,我将不得不在此打住你。在同一环境中使用 `vue` 和 `jquery` 并不是一个好的做法,这导致两个框架的相互冲突。我强烈建议使用一个 `bootstrap` 的替代方法,并使用 `vue` 提供的 JavaScript 的功能。一些建议包括使用 [`bootstrap-vue`](https://github.com/bootstrap-vue/bootstrap-vue) 和 [`vue-strap`](https://github.com/yuche/vue-strap)。若有任何原因使你必须使用 `jquery`,记得从 `webpack` 的文档里寻求有关 `ProvidePlugin` 的指导,或者参见 [\#192](https://github.com/SimulatedGREG/electron-vue/issues/192)。

## 如何调试 `main` 进程?

当使用 `electron@^1.7.2` 时,你可以打开 Goog​​le Chrome,然后转到 `chrome://inspect`,在应用程序以开发模式运行时,弹出远程的 electron 进程。

[Electron 文档](https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md)


================================================
FILE: docs/cn/file-tree.md
================================================
# 文件树

### 在开发过程中

**注意**: 某些文件或文件夹可能会根据在 `vue-cli` 脚手架中所选设置的不同而有所不同。

```
my-project
├─ .electron-vue
│  └─ <build/development>.js files
├─ build
│  └─ icons/
├─ dist
│  ├─ electron/
│  └─ web/
├─ node_modules/
├─ src
│  ├─ main
│  │  ├─ index.dev.js
│  │  └─ index.js
│  ├─ renderer
│  │  ├─ components/
│  │  ├─ router/
│  │  ├─ store/
│  │  ├─ App.vue
│  │  └─ main.js
│  └─ index.ejs
├─ static/
├─ test
│  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ utils.js
│  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ karma.config.js
│  └─ .eslintrc
├─ .babelrc
├─ .eslintignore
├─ .eslintrc.js
├─ .gitignore
├─ package.json
└─ README.md
```

#### 产品构建

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```

可以说,几乎所有的东西都在最终的产品构建中被删除。在分发 electron 应用程序时,这几乎是强制性的,因为你不希望用户下载拥有庞大文件的臃肿的软件。


================================================
FILE: docs/cn/getting_started.md
================================================
# 起步

## 脚手架

该样板代码被构建为 [`vue-cli`](https://github.com/vuejs/vue-cli) 的一个模板,并且包含多个选项,可以自定义你最终的脚手架程序。本项目需要使用 `node@^7` 或更高版本。electron-vue 官方推荐 [`yarn`](https://yarnpkg.org) 作为软件包管理器,因为它可以更好地处理依赖关系,并可以使用 `yarn clean` 帮助减少最后构建文件的大小。

```bash
# 安装 vue-cli 和 脚手架样板代码
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# 安装依赖并运行你的程序
cd my-project
yarn # 或者 npm install
yarn run dev # 或者 npm run dev
```

#### 关于 electron

虽然是可选的,仍旧我们建议在创建项目之后锁定你 electron 的版本。这样可以防止在同一项目上工作的其他开发者使用不同的版本进行开发。electron 经常发布新版本,所以一些功能特性总是会发生相应的变化。[更多信息](http://electron.atom.io/docs/tutorial/electron-versioning/)。


#### Windows 用户注意事项

如果在 `npm install` 期间遇到关于 `node-gyp` 的错误,那么你很有可能没有在你的系统上安装正确的构建工具。构建工具包括 Python 和 Visual Studio 等等。感谢 [@felixrieseberg](https://github.com/felixrieseberg),有几个软件包可以帮助简化此过程。

我们需要检查的第一项是 npm 的版本,并确保它是最新的。这个可以使用 [`npm-windows-upgrade`](https://github.com/felixrieseberg/npm-windows-upgrade) 来完成。如果你使用 `yarn`,则可以跳过此项检查。

若上一项检查完成,我们可以继续设置所需的构建工具。使用 [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools) 来为我们完成大部分烦人的工作。全局安装此工具将依次设置 Visual C++ 软件包、Python 等等。

到现在为止,所有工具都应该成功安装了,如果没有,那么你就会需要安装一个干净的 Visual Studio。请注意,这些并不是 electron-vue 自身的问题 \(Windows 有时候可能会很难用 ¯\\\_\(ツ\)\_/¯\)。


================================================
FILE: docs/cn/global_configuration.md
================================================
# Global Configuration

electron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre-processing, bundling, and building your app. The default settings are rather common and should meet most of your needs. An additional `config.js` is provided in the root directory for quick adjustments. Further customization can be made by directly adjusting `webpack.main.config.js` and `webpack.renderer.config.js`.

#### `config.js`
**Note**: Some options may differ based on the settings choosen during `vue-cli` scaffolding.

```js
{
  // Name of electron app
  // Will be used in production builds
  name: 'app',

  // Use ESLint
  // Further changes can be made in `.eslintrc.js`
  eslint: true,

  // webpack-dev-server port
  port: 9080,

  // electron-packager options
  // See `Building you app` for more info
  building: {
    arch: 'x64',
    asar: true,
    dir: path.join(__dirname, 'app'),
    icon: path.join(__dirname, 'app/icons/icon'),
    ignore: /\b(src|index\.ejs|icons)\b/,
    name: pkg.name,
    out: path.join(__dirname, 'builds'),
    overwrite: true,
    platform: process.env.PLATFORM_TARGET || 'all'
  }
}
```


================================================
FILE: docs/cn/main-process.md
================================================
# 主进程

> 在 Electron 中,运行 package.json 主脚本的过程称为主进程 (main process)。在主进程中运行的脚本可以通过创建网页来显示其图形化界面。

**摘自** [**Electron 文档**](http://electron.atom.io/docs/tutorial/quick-start/#main-process)

---

由于 `main` 进程本质上是一个完整的 node 环境,所以除了以下两个文件之外,并没有什么初始的项目结构。

#### `src/main/index.js`

这个文件是你应用程序的主文件,`electron` 也从这里启动。它也被用作 `webpack` 产品构建的入口文件。所有的 `main` 进程工作都应该从这里开始。

#### `app/src/main/index.dev.js`

这个文件专门用于开发阶段,因为它会安装 `electron-debug` 和 `vue-devtools`。一般不需要修改此文件,但它可以用于扩展你开发的需求。

## 关于 `__dirname` 与 `__filename` 的使用

由于 `main` 进程是使用 `webpack` 来绑定的,所以使用 `__dirname` 和 `__filename` **将不会** 在产品阶段给你提供一个预期的值。若参考 [**文件树**](/file-tree.md) 你会注意到,在产品阶段,`main.js` 被放在了 `dist/electron` 文件夹里面。应根据此点相应地使用 `__dirname` 和 `__filename`。

**如果你需要 `static/` 资源目录的路径,请务必阅读** [**使用静态资源**](/using-static-assets.md) **学习了解非常方便的 `__static` 变量。**


```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```


================================================
FILE: docs/cn/meta.md
================================================
# 更多

### 感谢

哇,非常感谢你们的帮助,使得 electron-vue 在 GitHub 上成为(我可以找到的)前 3 名 `vue-cli` 模板之一。我从来没有想过这个项目会像今天一样脱颖而出。回想过去,我起初(在 **2016年5月**)做了这个样板只是为个人的闭源项目。当我知道我已经完成了大部分的代码之后,我决定开源(样板本身)。转到今天,项目里已经有了这么多新的功能,并且得到了社区的大力支持。我也想给社区的人们一些特别的话,你们帮助我解决了一些我无法解决的问题。你们绝对没有任何义务去做任何事情,但是你们还是这么做的,我很感激。

如果你正在阅读这篇文章,那我几乎可以假设你真的很喜欢 electron-vue。我花了很多时间在创建这个样板上。如果你愿意的话,请自愿留下一些小费。electron-vue 未来的发展肯定不会依赖于这些捐赠,但如果你决定捐赠,它总是一个可以的选择。

#### [**使用 PayPal.me 进行转账**](https://www.paypal.me/simulatedgreg/5)


================================================
FILE: docs/cn/migration-guide.md
================================================
# 迁移指南

本文档尝试解释 _应该_ 如何实现你的项目迁移,但是由于整体项目结构始终可能变化,因此,这可能不是一个完整验证过的方法。

1. 使用 `vue init simulatedgreg/electron-vue my-project` 生成一个崭新的 electron-vue 项目
2. 将当前项目 `src` 内的文件复制到新项目的 `src` 目录中
3. 将 `package.json` 里的依赖关系从当前项目复制到新项目的 `package.json` 里
4. 使用 `yarn` 或 `npm install` 安装依赖
5. 在开发模式下运行项目 \(`yarn run dev` 或 `npm run dev`\)
6. 监视控制台以修复可能出现的错误

正如前面提到的,并没有一个完整验证过的方法来迁移到一个新的项目,但上述这些步骤,通常是可以让你成功完成迁移。任何对项目结构或资源处理的私自修改,将依靠你或你的团队来完成迁移。请确保查看文档的其余部分,因为它将始终反映 electron-vue 当前版本的 `master` 分支。


================================================
FILE: docs/cn/miscellaneous.md
================================================


================================================
FILE: docs/cn/new-releases.md
================================================
# 新版本

electron-vue 自 2016年5月初 创建以来有了很大的发展,并引入了许多新奇的功能。你能相信有一段时间该项目还不支持 `vue-cli` 脚手架吗?新功能的开发计划不会停止。唯一的缺点是,每天都有华而不实的东西存在,进而把你的项目卡在一个老的脚手架上。尽管 electron-vue 利用了 `vue-cli` 的优势,遗憾的是,并没有一个结构化的方式来 _版本化_ (_version_) 样板 或 使其变得 _可更新_ (_updatable_)。

electron-vue 的主要更新将通过 GitHub 的 里程碑 (Milestones) 进行,并将包含许多新的功能和错误的修复,这使得这些版本成为了最佳的 [迁移](/migration-guide.md) 契机,用来从任何现有项目转换为较新的架构。这些里程碑通常不是预先计划的,而是随着问题提交里的功能请求,在追踪问题的时候加上去的。

### 之前的里程碑

#### [复用](https://github.com/SimulatedGREG/electron-vue/milestone/1?closed=1)

* 迁移到 `webpack` 2
* 支持 `electron-builder`
* 支持 `main` 进程的捆绑
* 一般的错误修复

#### [简化](https://github.com/SimulatedGREG/electron-vue/issues/171)

* 迁移到单一的 `package.json` 结构
* 针对 `electron-builder` 用户的 Travis CI / AppVeyor 配置
* `renderer` 进程的最小化网页输出
* 迁移到 `axios`
* 完全支持 `main` 进程捆绑
* 重写开发和构建的脚本
* 迁移到 `babili` 以避免完全反编译到 ES5
* 在使用需要完整路径 \([`__static`](/using-static-assets.md)\) 的模块时支持 `static/` 资源


================================================
FILE: docs/cn/npm_scripts.md
================================================
# NPM 脚本

为了帮助你消除开发过程中的冗余任务,请注意一些可用的 NPM 脚本。以下命令应该运行在项目的根目录下。当然,你可以使用 `yarn run <command>` 的方式运行下列任何命令。

### `npm run build`

为了产品和打包来构建你的应用程序。更多信息可以在 [**构建你的应用程序**](building_your_app.md) 部分找到。

### `npm run dev`

在开发环境中运行程序

### `npm run lint`

静态分析所有在 `src/` 和 `test/` 下面的 JS 以及 Vue 组件文件。

### `npm run lint:fix`

静态分析所有在 `src/` 和 `test/` 下面的 JS 以及 Vue 组件文件并且尝试修复问题。

### `npm run pack`

同时运行 `npm run pack:main` 和 `npm run pack:renderer`。 虽然这些命令是可用的,但很少情况下,你需要手动执行此操作,因为 `npm run build` 将处理此步骤。

### `npm run pack:main`

运行 webpack 来打包 `main` 进程的源代码。

### `npm run pack:renderer`

运行 webpack 来打包 `renderer` 进程的源代码。

### `npm run unit`

运行使用了 Karma + Jasmine 的单元测试。更多信息请见 [**单元测试**](unittesting.md)。

### `npm run e2e`

运行使用了 Spectron + Mocha 的端对端测试。更多信息请见 [**端对端测试**](unittesting.md)。

### `npm test`

运行 `npm run unit` 和 `npm run e2e`. 更多信息请见 [**测试**](unittesting.md)。


================================================
FILE: docs/cn/project_structure.md
================================================
# 项目结构

当涉及制作 electron 应用程序的问题时,项目结构会有些不同。如果你以前使用过官方的 [`vuejs-templates/webpack`](https://github.com/vuejs-templates/webpack) 设置,那么你对这个结构应该很熟悉。本文档在此章节将尝试解释样板代码的工作原理以及应用程序在构建中的一些区别。

### 单一的 `package.json` 设置

就在不久之前,两个 `package.json` 的设置是必需的,但是,感谢 [@electron-userland](https://github.com/electron-userland) 的努力,[`electron-packager`](https://github.com/electron-userland/electron-packager) 和 [`electron-builder`](https://github.com/electron-userland/electron-builder) 现在完全支持单一的 `package.json` 设置。

#### `dependencies`

这些依赖项 **将会被** 包含在你最终产品的应用程序中。所以,如果你的应用程序需要某个模块才能运行,那么请在此安装!

#### `devDependencies`

这些依赖项 **不会被** 包含在你最终产品的应用程序中。在这里,你可以安装专门用于开发的模块,如构建脚本、`webpack` 加载器等等。

#### 安装原生 NPM 模块

我们需要确保我们本地的 npm 模块是针对 electron 来构建的。为了做到这一点,我们可以使用 [`electron-rebuild`](https://github.com/electron/electron-rebuild),但是为了使事情变得更简单,我们强烈建议使用 [`electron-builder`](https://github.com/electron-userland/electron-builder) 作为你的构建工具,因为它会为你处理很多任务。

### 关于 `main` 进程

在开发过程中,你可能会注意到 `src/main/index.dev.js`。该文件专门用于开发以及安装开发工具。原则上,该文件不应该被修改,但是可以被用来扩展你的开发需求。在构建的过程中,`webpack` 将介入其中并创建一个的捆绑,以 `src/main/index.js` 作为该捆绑的入口文件。


================================================
FILE: docs/cn/renderer-process.md
================================================
# 渲染器进程

> 由于 Electron 使用 Chromium 显示网页,那么,Chromium 的多进程架构也被使用。Electron 中的每个网页都在自己的进程中运行,称为渲染器进程 (renderer process)。
>
> 在正常的浏览器中,网页通常运行在沙盒封装化的环境中,并且不允许访问本机资源。然而,Electron 用户有权在网页中使用 Node.js 的 API,从而允许较低级别的操作系统交互。

**选自** [**Electron 文档**](http://electron.atom.io/docs/tutorial/quick-start/#renderer-process)

---

## 关于 `vue` 和 `vuex`

### vue 组件

如果你不熟悉 Vue 组件,请阅读 [此处](http://vuejs.org/v2/guide/single-file-components.html)。组件的使用使我们大型、复杂的应用程序更加有组织化。每个组件都有能力封装自己的 CSS、模板 和 JavaScript 的功能。

组件存放在 `src/renderer/components` 里。创建子组件时,一个常用的组织化实践是将它们放置在一个使用其父组件名称的新文件夹中。在协调不同的路由时,这一点特别有用。

```
src/renderer/components
├─ ParentComponentA
│  ├─ ChildComponentA.vue
│  └─ ChildComponentB.vue
└─ ParentComponentA.vue
```

### vue 路由

有关 `vue-router` 的更多信息请点击 [这里](https://github.com/vuejs/vue-router)。 简而言之,我们鼓励使用 `vue-router`,因为创建 单页应用程序 (Single Page Application) 在制作 electron 程序的时候更加实用。你真的想管理一堆 BrowserWindows,然后在其之间传达信息吗?恐怕不会。

路由被保存在 `src/renderer/router/index.js` 里并定义如下...

```js
{
  path: '<routePath>',
  name: '<routeName>',
  component: require('@/components/<routeName>View')
}
```

... 其中 `<routePath>` 和 `<routeName>` 都是变量。然后,这些路由使用 `src/renderer/App.vue` 的 `<router-view>` 指令附加到组件树上。

##### 注意

在使用 `vue-router` 时,不要使用 [**HTML5 历史模式**](http://router.vuejs.org/en/essentials/history-mode.html)。 此模式严格用于通过 `http` 协议提供文件,并且不能正常使用 `file` 协议,但是 electron 在产品构建中使用此协议提供文件。默认的 `hash` 模式正是我们所需要的。

### vuex 模块

描述 `vuex` 并不是简单的事情,所以请阅读 [这里](https://vuex.vuejs.org/zh/),以便更好地了解它试图解决的问题及其工作原理。

electron-vue 利用 `vuex` 的模块结构创建多个数据存储,并保存在 `src/renderer/store/modules` 中。

拥有多个数据存储对于组织化来说可能很好,但你必须导入每一个数据,这也可能令人厌烦。但是不要担心,因为 `src/renderer/store/modules/index.js` 帮我们处理了这些麻烦事!这个简单的脚本让 `src/renderer/store/index.js` 一次性导入我们所有的模块。如果所有这些都没有,只要知道你可以轻松地复制给定的 `Counter.js` 模块,它将以 "神奇" 的方式被加载进来。


================================================
FILE: docs/cn/savingreading-local-files.md
================================================
# 读写本地文件

使用 `electron` 的一大好处是可以访问用户的文件系统。这使你可以读取和写入本地系统上的文件。为了避免 Chromium 的限制以及对应用程序内部文件的改写,请确保使用 `electron` 的 API,特别是 [`app.getPath(name)`](https://electron.atom.io/docs/api/app/#appgetpathname) 函数。这个帮助函数可以使你获得指向系统目录的文件路径,如用户的桌面、系统临时文件 等等。

### 使用案例

假设我们想为我们的应用程序提供本地的数据库存储。在这个例子中,我们将用 [`nedb`](https://github.com/louischatriot/nedb) 作为演示。

```bash
yarn add nedb # 或 npm install nedb --save
```

**src/renderer/datastore.js**

这里,我们设置 NeDB 并将其指向我们的 `userData` 目录。这个空间专门为我们的应用程序所保留,所以,我们可以确信,其他程序 或 与其他用户的交互不应该篡改这个文件空间。至此,我们可以在 `renderer` 进程中导入 `datastore.js` 并使用它。

```js
import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'

export default new Datastore({
  autoload: true,
  filename: path.join(remote.app.getPath('userData'), '/data.db')
})
```

**src/renderer/main.js**

为了更进一步,我们可以将数据存储导入到 `src/renderer/main.js` 里,并将其附加到 Vue 的 原型 (prototype) 上。通过在所有组件文件中使用 `this.$db`,我们现在可以访问数据存储的 API。

```js
import db from './datastore'

/* 其它代码 */

Vue.prototype.$db = db
```


================================================
FILE: docs/cn/testing.md
================================================
# 测试

因受到了官方样板代码 `vuejs-templates/webpack` 提供的测试功能的极大启发,electron-vue 同时支持单元测试和 `renderer` 进程的端到端测试。在 `vue-cli` 脚手架中,你可以选择是否包含测试。

## [单元测试](unittesting.md)

使用 Karma + Mocha 运行单元测试

```bash
npm run unit
```

## [端对端测试](end-to-end_testing.md)

使用 Spectron + Mocha 运行端对端测试

```bash
npm run e2e
```

## 运行所有测试

```bash
npm test
```

### 关于 CI 测试

如果在脚手架时你决定使用 `electron-builder` 作为构建工具,那么你可以在针对 `darwin`、`linux` 和 `win32` 的 Travis CI 以及 AppVeyor 上轻松测试你的程序。在 `.travis.yml` 和 `appveyor.yml` 两者之间,你会发现一些被注释掉的部分,你可以快速取消注释以启用测试。确保阅读 [**使用 CI 的自动化部署**](using-electron-builder.md#automated-deployments-using-ci) 上的更多信息。


================================================
FILE: docs/cn/unittesting.md
================================================
# 单元测试

对于进行单元测试,electron-vue 使用 [Karma](https://karma-runner.github.io/1.0/index.html) 作为测试的运行器,使用 [Mocha](https://mochajs.org/) \(与 [Chai](http://chaijs.com/)\ 作为测试框架。

Mocha 和 Chai 分别使用 `karma-mocha` 和 `karma-chai` 进行集成,所以所有的 API(例如 `expect`)都可以在测试文件中全局使用。

### 运行测试

```bash
# 开始 Karma
npm run unit
```

### 文件结构

```
my-project
├─ test
|  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ karma.conf.js
```

**在大多数情况下,你可以忽略** `index.js` **和** `karma.conf.js` **,只专注于编写** `specs/` **。**

#### `specs/`

这个目录里面是编写实际测试代码的地方。由于 Webpack 的强大功能,你可以完全依照 ES2015 和 其支持的加载程序编写。

#### `index.js`

这是 `karma-webpack` 使用的入口文件。该文件的目的是一次性收集加载所有的测试和源代码。

#### `karma.conf.js`

在这里,你可以找到实际的 `karma` 配置,并使用 spec/coverage 记录器进行设置。你可以根据 [karma 官方文档](http://karma-runner.github.io/1.0/config/configuration-file.html) 进一步定制。

### Mocking Dependencies

electron-vue 默认安装 [`inject-loader`](https://github.com/plasticine/inject-loader)。有关使用 Vue 组件文件的信息,请参阅 [`vue-loader' 的测试与仿真文档](http://vue-loader.vuejs.org/en/workflow/testing-with-mocks.html)。


================================================
FILE: docs/cn/using-electron-builder.md
================================================
# [`electron-builder`](https://github.com/electron-userland/electron-builder) 的使用

所有 `electron-builder` 生成的文件都可以在 `build` 文件夹中找到。

#### 构建

```bash
npm run build
```

#### 构建未打包的目录

生成简单的可执行文件,没有完整的安装程序。用于快速测试。

```bash
npm run build:dir
```

### 默认的构建配置

可以在 `package.json` 中使用基于 `electron-builder` 的 [各种选项](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options) 进行进一步定制。

```js
"build": {
  "productName": "ElectronVue",
  "appId": "org.simulatedgreg.electron-vue",
  "dmg": {
    "contents": [
      {
        "x": 410,
        "y": 150,
        "type": "link",
        "path": "/Applications"
      },
      {
        "x": 130,
        "y": 150,
        "type": "file"
      }
    ]
  },
  "directories": {
    "output": "build"
  },
  "files": [
    "dist/electron",
    "node_modules/",
    "package.json"
  ],
  "mac": {
    "icon": "build/icons/icon.icns"
  },
  "win": {
    "icon": "build/icons/icon.ico"
  },
  "linux": {
    "icon": "build/icons"
  }
}
```

## 使用 CI 的自动化部署

当使用 electron-vue 的 `electron-builder` 配置时,本项目还提供了用于自动部署的 `appveyor.yml` 和 `.travis.yml`。两个配置文件都被设置好了用于构建你的 electron 应用,并将生成的程序推送到 GitHub 的发布页面、Bintray 等。Travis CI 用于构建 `linux` 和 `darwin` \(macOS\),而 AppVeyor 用于构建 `win32`。这两项服务都是免费的 OSS 项目。

#### 设置 Travis CI 和 AppVeyor

1. 在 [Travis CI](https://travis-ci.org/getting_started) 或 [AppVeyor](https://www.appveyor.com/) 上创建一个帐户
2. 链接到你 electron-vue 项目的 GitHub 仓库
3. 访问 [https://github.com/settings/tokens](https://github.com/settings/tokens) 并点击 **生成新令牌 (Generate new token)** \(同样的令牌可用于 Travis CI 和 AppVeyor 二者\)
    1. 设置一个 **令牌描述 (Token description)**
    2. 检查 **public\_repo** 的范围
    3. 点击 **生成令牌 (Generate token)**
4. 复制你的新令牌并保存以备以后使用
5. 打开 Travis CI 或 AppVeyor 上的仓库设置选项,添加一个新的 **环境变量 (Environment Variable)**
    1. 将变量的名称设置为 `GH_TOKEN`
    2. 将变量的值设置为刚刚创建的 GitHub 的访问令牌
    3. **保存 (Save)** 新变量并确保加密措施已启用

现在,所有的事情应该都配置完毕了。Travis CI / AppVeyor 在默认情况下会监测到任何到你的 `master` 分支的推送。推送完毕后,Travis CI / AppVeyor 将克隆你的仓库到其服务器并开始构建过程。在最后阶段,`electron-builder` 可以看到环境变量 `GH_TOKEN`,并创建一个发布草稿,并将生成的程序上传到你公共的 GitHub 仓库上。现在,你可以编辑发布草稿,然后发布出去。发布了发行版后,通过更新你的 `package.json`,你可以确保将来的版本标上新版本号。

#### 自动更新

启用你应用程序自动更新的接收选项是一个超级好用的功能,但要知道你必须要有 [**代码签名 (Code Signing)**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing)。你可以根据 [这里](https://github.com/electron-userland/electron-builder/wiki/Code-Signing) 描述的 `electron-builder` 需求来添加更多的环境变量用于设置代码签名。安装证书后,你可以安装 `electron-updater` 并注释掉 `src/main/index.js` 底部的代码以启用自动更新。

如果你像大多数人一样,并且没有花哨的代码签名证书,那么你可以随时使用 GitHub API 来检查新的软件发布。当检测到新版本时,你的应用程序会提供一条通知,导向用户可以下载并安装新版本的下载页面。由于 `electron-builder` 提供的了不起的安装程序,用户无需卸载当前版本,新的安装将替代旧的版本,同时仍然保留任何 Web 存储或 `userData` 文件。


================================================
FILE: docs/cn/using-electron-packager.md
================================================
# [`electron-packager`](https://github.com/electron-userland/electron-packager) 的使用

所有 `electron-packager` 生成的文件都可以在 `build` 文件夹中找到。

#### 针对所有平台的构建

请注意,并非所有操作系统都可以为所有其他平台进行构建。

```bash
npm run build
```

#### 针对特定平台的构建

平台包括 `darwin`、 `mas`、 `linux` 和 `win32`。

```bash
# build for darwin (macOS)
npm run build:darwin
```

#### 清除

从 `build` 删除所有的构建文件。

```bash
npm run build:clean
```

### 非 Windows 用户注意事项

如果你想在非 Windows 平台上为 Windows 构建时 **使用自定义图标**,你必须安装 [wine](https://www.winehq.org/)。[更多信息](https://github.com/electron-userland/electron-packager#building-windows-apps-from-non-windows-platforms)。

### 默认的构建配置

可以在 `.electron-vue/build.config.js` 中使用基于 `electron-packager` 的 [各种选项](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options) 进行进一步定制。你可以设置 `package.json` 里的 `productName` 来设置构建后的程序名称。

```js
{
    // 针对 'x64' 架构
    arch: 'x64',

    // 使用 'electron/asar' 压缩应用
    asar: true,

    // 应用程序的目录
    dir: path.join(__dirname, '../'),

    // 设置 electron 程序的图标
    // 基于平台添加文件的扩展
    //
    // 如果针对 Linux 进行构建, 请阅读
    // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon
    icon: path.join(__dirname, '../build/icons/icon'),

    // 忽略可能造成最后程序很大的文件
    ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,

    // 把构建结果存储到 `builds`
    out: path.join(__dirname, '../build'),

    // 重写现有构建
    overwrite: true,

    // 指定平台的环境变量
    platform: process.env.BUILD_TARGET || 'all'
}
```


================================================
FILE: docs/cn/using-static-assets.md
================================================
# 静态资源的使用

如果你以前使用过官方的 `vuejs-templates/webpack` 样板,那么你应该对 `static/` 目录很熟悉。这里面,你可以放置可供 `main` 和 `renderer` 进程使用的静态资源。在 Vue 应用程序中使用这些资源很简单,但是使用 `fs` 和其他需要完整路径的模块可能会有点棘手。 幸运的是,electron-vue 提供了一个 `__static` 变量,它可以在开发和产品阶段生成 `static/` 目录的路径。

### Vue 组件里 `src` 标签的使用案例

假设我有一个组件需要下载一个图像,但是直到一些其他任务完成后这个图像的地址才能知道。简单起见,让我们用一个 `data` 变量来绑定图像的来源。

**SomeComponent.vue**

```html
<template>
  <img v-bind:src="imageUrl">
</template>

<script>
  export default {
    data () {
      // 注意 路径的起始是 `static/`
      return { imageUrl: 'static/imgs/unsplash.png' }
    }
  }
</script>
```

此处,`webpack` 并不会捆绑图像 `unsplash.png`,并且应用程序可以看到 `static/imgs/unsplash.png` 目录里的资源。感谢 `vue-loader` 为我们完成了所有繁琐的工作。

### JS 搭配 `fs`、`path` 和 `__static` 的使用案例

假设我们有一个静态资源,我们需要使用 `fs` 将它读入到我们的应用程序中,但是我们如何在开发和产品阶段为 `static/` 目录获得可靠的路径呢?electron-vue 提供了一个名为 `__static` 的全局变量,它将产生一个指向 `static/` 目录的正确路径。以下是我们在开发和产品阶段如何使用它读取一个简单的文本文件。

**static/someFile.txt**

```txt
foobar
```

**SomeFile.js \(** `main` **或** `renderer` **进程\)**

```js
import fs from 'fs'
import path from 'path'

let fileContents = fs.readFileSync(path.join(__static, '/someFile.txt'), 'utf8')

console.log(fileContents)
// => "foobar"
```

请注意,在产品阶段,默认情况下,所有文件都包含 [`asar`](https://github.com/electron/asar),因为它是被极力推荐的。因此,`static/` 文件夹中的资源只能在 `electron` 内部访问,因为只有 `electron` 了解此行为。由此,如果你打算将文件分发给用户,例如在外部程序中打开文件,那么,首先你需要将这些资源从应用程序复制到用户的文档空间或桌面中。从那里,你可以使用 electron 的 API [`shell.openItem()`](https://electron.atom.io/docs/api/shell/#shellopenitemfullpath) 来打开这些资源。

这种情况的一种替代方法,是配置 `electron-packager` 或 `electron-builder`,设置特定文件,用来 “解压缩” 在产品阶段的 `asar` 存档。electron-vue 并没有计划支持这种方法; 任何与此或与如何设定此事项相关的问题将被关闭。


================================================
FILE: docs/cn/using_css_frameworks.md
================================================
# CSS 框架的使用

虽然这可能看起来并不明智,但我建议你使用 [`style-loader`](https://github.com/webpack/style-loader) 将第三方 CSS 库导入 webpack,其实这一点我们已经为你做了。

## 使用案例

假设你要为你的程序使用 [bootstrap](http://getbootstrap.com/)、[bulma](http://bulma.io/) 或者 [materialize](http://materializecss.com/)。你可以仍旧像通常情况下一样,从 `npm` 安装你的库,而不是将资源附加到 `index.ejs` 上,我们将在我们的 JavaScript 中导入 CSS,具体在 `src/renderer/main.js` 中。

#### 例子

让我们安装 `bulma` 如下

```bash
npm install bulma --save
```

然后,在 `src/renderer/main.js` 里面加入这一行:

```bash
import 'bulma/css/bulma.css'
```

替代方案是, 你也可以在你的组件文件中引用 `bulma`。

**App.vue**

```html
<style>
  @import "~bulma/css/bulma.css";
</style>
```

现在,`webpack` 会为我们的应用程序加载 `bulma`,并使其在产品构建中可用.


================================================
FILE: docs/cn/using_pre-processors.md
================================================
# 预处理器的使用

将 [`vue-loader`](https://github.com/vuejs/vue-loader) 与 [`webpack`](https://github.com/webpack/webpack) 一起使用的好处之一是能够直接在你的 Vue 组件文件中预处理你的 HTML/CSS/JS,而无需其他工作。请查询 [**这里**](https://vuejs.org/v2/guide/single-file-components.html) 相关的详细信息。

## 使用案例

假设我们需要使用 Sass/SCSS 来预处理我们的 CSS。首先,我们需要安装正确的 `webpack` 加载器来处理这种语法。

#### 安装 `sass-loader`

```bash
npm install --save-dev sass-loader node-sass
```

一旦安装了我们需要的加载器,一切就都差不多完成了。`vue-loader` 将神奇地做好其余的工作。现在我们可以轻松地将 `lang="sass"` 或 `lang="scss"` 添加到我们的 Vue 组件文件中。注意,我们还安装了 `node-sass`,因为它是 `sass-loader` 的依赖包。

#### 应用 `lang` 属性

所以...

```html
<style>
  body {
    /* CSS */
  }
</style>
```

... 现在变成了 ...

```html
<style lang="scss">
  body {
    /* SCSS */
  }
</style>
```

相同的原理适用于任何其他预处理器。那么,也许你的 JS 需要 coffeescript?只需安装 [coffeescript-loader](https://github.com/webpack/coffee-loader),并将属性 `lang=“coffeescript”` 应用到你的 `<script>` 标签上。

要获得该功能更高级的使用情况,请转到 [vue-loader 的文档](https://vue-loader.vuejs.org/zh/guide/pre-processors.html) 了解更多信息。

## Sass/SCSS 全局变量的使用

当使用 Sass/SCSS 作为你的 CSS 语法时,在整个 Vue 组件文件中使用 全局变量 与 混合嵌套 是非常有益的。以下是此方法的实现。

### 使用案例

此示例演示了如何将 `globals.scss` 应用于所有的 Vue 组件文件中。本文档假设你已经在开发环境中如上所述地设置了 `sass-loader`。

#### 定义你的全局变量

**src/renderer/globals.scss**

```scss
$brand-primary: blue;
$brand-accent: turquoise;
```

#### 直接向 `node-sass` 注入 `globals.scss`

在 **.electron-vue/webpack.renderer.config.js** 里编辑 `vue-loader` 的配置

```js
loaders: {
  sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1&data=@import "./src/renderer/globals"',
  scss: 'vue-style-loader!css-loader!sass-loader?data=@import "./src/renderer/globals";'
}
```

#### 使用你的全局变量

**SomeComponent.vue**

```html
<style lang="scss">
  body { color: $brand-primary; }
</style>
```


================================================
FILE: docs/cn/using_the_file_structure.md
================================================
# Using the File Structure

electron-vue 尽可能不强制一个特别的项目结构,但是努力去跟随通用 Vue & Electron 的实践。以下文档描述了在元项目结构中使用的通用实践。

**如果你对 Electron 的 **`renderer`** 和 **`main`**进程不熟悉,请认真阅读第一部分 **[**快速起步**](http://electron.atom.io/docs/tutorial/quick-start)**。它详尽的解释了他们的不同。**

### [渲染进程](renderer-process.md)

### [主进程](main-process.md)


================================================
FILE: docs/cn/vue_accessories.md
================================================
# Vue 插件

electron-vue 包含以下 `vue` 插件,可以使用 `vue-cli` 脚手架安装...

* [axios](https://github.com/mzabriskie/axios)\(网络请求\)
* [vue-electron](https://github.com/SimulatedGREG/vue-electron) \(将 electron API 附加到 Vue 对象\)
* [vue-router](https://github.com/vuejs/vue-router) \(单页应用路由\)
* [vuex](https://github.com/vuejs/vuex) \(flux 启发的应用程序架构\)

---

### [`axios`](https://github.com/mzabriskie/axios)

> 基于 Promise,用于浏览器和 node.js 的 HTTP 客户端

如果你熟悉 `vue-resource`,那么你也会觉得 `axios` 并不陌生,因为大部分 API 几乎是一样的。你可以在 `main` 进程脚本中轻松导入 `axios`,或者在 `renderer` 进程中使用 `this.$http` 或 `Vue.http`。

### [`vue-electron`](https://github.com/SimulatedGREG/vue-electron)

> 将 electron API 附加到 Vue 对象的 vue 插件,使所有组件可以访问它们。

一个可以轻松通过 `this.$electron` 访问 electron API 的简单的 `vue` 插件,不再需要将 `electron` 导入到每一个组件中。

### [`vue-router`](https://github.com/vuejs/vue-router)

> `vue-router` 是 [Vue.js](http://vuejs.org/) 的官方路由。它与 Vue.js 的核心深度整合,使 Vue.js 单页应用程序的构建变得轻而易举。

本项目所提供的项目结构应该与官方样板 `vuejs-templates/webpack` 中提供的设置很相似。

### [`vuex`](https://github.com/vuejs/vuex)

> Vuex 是 Vue.js 应用程序的 **状态管理模式 + 库**。它作为程序中所有组件的集中存储,其规则确保了状态量只能以可预测的方式被改变。

本项目所提供的项目结构相当简单,但我们鼓励使用 `vuex` 的模块模式来帮助组织你的数据存储。外加的 `@/store/modules/index.js` 让你的 `vuex` 存储能够一次性导入所有的模块。


================================================
FILE: docs/cn/webpack-configurations.md
================================================
# Webpack 配置

electron-vue 包含三个单独的、位于 `.electron-vue/` 目录中的 webpack 配置文件。除了可选的使用 `web` 输出以外,`main` 和 `renderer` 在安装过程中都是相似的。两者都使用 `babel-preset-env` 来针对 `node@7` 的功能特性、使用`babili`、并把所有的模块都视为 `externals`。

### `.electron-vue/webpack.main.config.js`

针对 electron 的 `main` 进程。这种配置是相当简单的,但确实包括一些常见的 `webpack` 做法。

### `.electron-vue/webpack.renderer.config.js`

针对 electron 的 `renderer` 进程。此配置用来处理你的 Vue 应用程序,因此它包含 `vue-loader` 和许多其他可在官方 `vuejs-templates/webpack` 样板中找到的配置。

##### 白名单里的外部组件

一个关于此配置的重要的事情是,你可以将特定的模块列入白名单,而不是把它视为 webpack 的 `externals`。并没有很多情况需要这个功能,但在某些情况下,对于提供原始的 `*.vue` 组件的 Vue UI 库,他们需要被列入白名单,以至于 `vue-loader` 能够编译它们。另一个使用情况是使用 webpack 的 `alias`,例如设置 `vue` 来导入完整的 编译+运行环境 的构建。因此,`vue` 已经在白名单中了。

### `.electron-vue/webpack.web.config.js`

针对为浏览器构建你的 `renderer` 进程的源代码。如果你需要把代码发布到网上,此配置则是其强大的起步基础。 **electron-vue 不支持更多其他的 Web 输出。** 与 Web 输出相关的 Issues 很可能会被推迟或关闭。


================================================
FILE: docs/en/README.md
================================================
![](../images/logo.png)

> The boilerplate for making electron applications built with vue \(pretty much what it sounds like\).

[![Build Status](https://semaphoreci.com/api/v1/simulatedgreg/electron-vue/branches/master/badge.svg)](https://semaphoreci.com/simulatedgreg/electron-vue)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)

## Overview

The aim of this project is to remove the need of manually setting up electron apps using vue. electron-vue takes advantage of `vue-cli` for scaffolding, `webpack` with `vue-loader`, `electron-packager` or `electron-builder`, some of the most used plugins like `vue-router`, `vuex`, and so much more.

#### Check out the documentation [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

Things you'll find in this boilerplate...

* Basic project structure with a **single** `package.json` setup
* Detailed [documentation](https://simulatedgreg.gitbooks.io/electron-vue/content/)
* Project scaffolding using [vue-cli](https://github.com/vuejs/vue-cli)
* Ready to use Vue plugins \([axios](https://github.com/mzabriskie/axios), [vue-electron](https://github.com/SimulatedGREG/vue-electron), [vue-router](https://github.com/vuejs/vue-router), [vuex](https://github.com/vuejs/vuex)\)\*
* Installed [vue-devtools](https://github.com/vuejs/vue-devtools) and [devtron](https://github.com/electron/devtron) tools for development
* Ability to easily package your application using [electron-packager](https://github.com/electron-userland/electron-packager) or [electron-builder](https://github.com/electron-userland/electron-builder)\*
* `appveyor.yml` and `.travis.yml` configurations for automated deployments with [electron-builder](https://github.com/electron-userland/electron-builder)\*
* Ability to produce web output for browsers
* Handy [NPM scripts](/npm_scripts.md)
* Use of [webpack](https://github.com/webpack/webpack) and [vue-loader](https://github.com/vuejs/vue-loader) with Hot Module Replacement
* Process restarting when working in electron's `main` process
* HTML/CSS/JS pre-processor support with [vue-loader](https://github.com/vuejs/vue-loader/)
* ES6 with [`stage-0`](https://babeljs.io/docs/plugins/preset-stage-0/) by default
* Use of [`babili`](https://github.com/babel/babili) to remove the need of transpiling completely down to ES5
* ESLint \(with support for [`standard`](https://github.com/feross/standard) and [`airbnb-base`](https://github.com/airbnb/javascript)\)\*
* Unit Testing \(with Karma + Mocha\)\*
* End-to-end Testing \(with Spectron + Mocha\)\*

\*Customizable during `vue-cli` scaffolding

### Getting Started

This boilerplate was built as a template for [`vue-cli`](https://github.com/vuejs/vue-cli) and includes options to customize your final scaffolded app. The use of `node@^7` or higher is required. electron-vue also officially recommends the [`yarn`](https://yarnpkg.org) package manager as it handles dependencies much better and can help reduce final build size with `yarn clean`.

```bash
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# Install dependencies and run your app
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

##### Are you a Windows User?

Make sure to check out [**A Note for Windows Users**](https://simulatedgreg.gitbooks.io/electron-vue/content/en/getting_started.html#a-note-for-windows-users) to make sure you have all the necessary build tools needed for electron and other dependencies.

##### Wanting to use Vue 1?

Just point to the `1.0` branch. Please note that electron-vue has officially deprecated the usage of `vue@^1`, so project structure, features, and documentation will reflect those changes \([**legacy documentation**](https://github.com/SimulatedGREG/electron-vue/tree/1.0/docs)\).

```bash
vue init simulatedgreg/electron-vue#1.0 my-project
```

### Next Steps

Make sure to take a look at the [documentation](https://simulatedgreg.gitbooks.io/electron-vue/content/). Here you will find useful information about configuration, project structure, and building your app. There's also a handy [FAQs](https://simulatedgreg.gitbooks.io/electron-vue/content/en/faqs.html) section.

## Made with electron-vue

Take a look at some of the amazing projects built with electron-vue. Want to have your own project listed? Feel free to submit a pull request.

* [**Surfbird**](https://github.com/surfbirdapp/surfbird): A Twitter client built on Electron and Vue
* [**Lulumi-browser**](https://github.com/qazbnm456/lulumi-browser): Lulumi-browser is a light weight browser coded with Vue.js 2 and Electron
* [**Space-Snake**](https://github.com/ilyagru/Space-Snake): A Desktop game built with Electron and Vue.js.
* [**Forrest**](https://github.com/stefanjudis/forrest): An npm scripts desktop client
* [**miikun**](https://github.com/hiro0218/miikun): A Simple Markdown Editor
* [**Dakika**](https://github.com/Madawar/Dakika): A minute taking application that makes writing minutes a breeze
* [**Dynamoc**](https://github.com/ieiayaobb/dynamoc): Dynamoc is a GUI client for dynamodb-local, dynalite and AWS dynamodb
* [**Dockeron**](https://github.com/dockeron/dockeron): A dockeron project, built on Electron + Vue.js for Docker
* [**Easysubs**](https://github.com/matiastucci/easysubs): Download subtitles in a very fast and simple way
* [**adminScheduler**](https://github.com/danieltoorani/adminScheduler): An application leveraging electron for cross platform compatibility, Vue.js for lightning fast UI and full-calendar.io to deliver a premium calendar interface.
* [**Data-curator**](https://github.com/ODIQueensland/data-curator): Share usable open data.


================================================
FILE: docs/en/SUMMARY.md
================================================
# Summary

* [Introduction](./README.md)
* [Getting Started](getting_started.md)
* [Project Structure](project_structure.md)
  * [File Tree](file-tree.md)
  * [Renderer Process](renderer-process.md)
  * [Main Process](main-process.md)
  * [Webpack Configurations](webpack-configurations.md)
* [Development](development.md)
  * [Entry index.html](entry_indexhtml.md)
  * [Vue Plugins](vue_accessories.md)
  * [NPM Scripts](npm_scripts.md)
  * [Using CSS Frameworks](using_css_frameworks.md)
  * [Using Pre-Processors](using_pre-processors.md)
  * [Using Static Assets](using-static-assets.md)
  * [Read & Write Local Files](savingreading-local-files.md)
  * [Debugging](debugging-production.md)
* [Building Your App](building_your_app.md)
  * [Using electron-packager](using-electron-packager.md)
  * [Using electron-builder](using-electron-builder.md)
* [Testing](testing.md)
  * [Unit Testing](unittesting.md)
  * [End-to-End Testing](end-to-end_testing.md)
* [Meta](meta.md)
  * [FAQs](faqs.md)
  * [New Releases](new-releases.md)
  * [Migration Guide](migration-guide.md)
  * [Contributing](contributing.md)



================================================
FILE: docs/en/book.json
================================================
{
  "root": ""
}


================================================
FILE: docs/en/building_your_app.md
================================================
# Building Your App

electron-vue supports both [electron-packager](https://github.com/electron-userland/electron-packager) and [electron-builder](https://github.com/electron-userland/electron-builder) to build and distribute your production ready application. Both build tools are backed by the amazing [@electron-userland](https://github.com/electron-userland) community and each have detailed documentation. During `vue-cli` scaffolding you will be asked which builder you will want to use.

## [`electron-packager`](using-electron-packager.md)

If you are new to making electron applications or just need to create simple executables, then `electron-packager` is perfect for your needs.

## [`electron-builder`](using-electron-builder.md)

If you are looking for full installers, auto-update support, CI building with Travis CI & AppVeyor, or automation of rebuilding native node modules, then `electron-builder` is what you will need.



================================================
FILE: docs/en/contributing.md
================================================
# Contributing
Wanting to help with this boilerplate? Feel free to submit a pull request. Before getting ready to submit anything, make sure to check out the following...

### JavaScript Standard Style
To ensure all JS follows basic ***style standards*** make sure it follows these [rules](http://standardjs.com/#rules).

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

================================================
FILE: docs/en/debugging-production.md
================================================
# Debugging

### Main Process

When running your application in development you may have noticed a message from the `main` process mentioning a remote debugger. Ever since the release of `electron@^1.7.2`, remote debugging over the Inspect API was introduced and can be easily accessed by opening the provided link with Google Chrome or through another debugger that can remotely attach to the process using the default port of 5858, such as Visual Studio Code.

```bash
┏ Electron -------------------

  Debugger listening on port 5858.
  Warning: This is an experimental feature and could change at any time.
  To start debugging, open the following URL in Chrome:
      chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5858/22271e96-df65-4bab-9207-da8c71117641

┗ ----------------------------
```

### Production Builds

###### Notice

Although it is possible to debug your application in production, please do know that production code is minified and highly unreadable compared to what you find during development.

##### `renderer` Process

There isn't much of a big difference here than it is in development. You can simply invoke the dev tools using the [`BrowserWindow` APIs](https://electron.atom.io/docs/api/web-contents/#contentsopendevtoolsoptions). Using the initial electron-vue setup, you can add the following snippet of code inside `src/main/index.js` , just after the `new BrowserWindow` construction, to force the dev tools to open on launch.

```js
mainWindow.webContents.openDevTools()
```

##### `main` Process

Similar to what is mentioned above, you can also attach an external debugger to the `main` process to remotely debug your application. In order to activate the debugger in production you can add the follow snippet after the `app` import inside `src/main/index.js`. Then you can navigate Google Chrome to `chrome://inspect` and get connected.

```js
app.commandLine.appendSwitch('inspect', '5858')
```





================================================
FILE: docs/en/development.md
================================================
# Development

### Starting the development setup

After you have installed dependencies with `yarn` or `npm install`, then run...

```bash
yarn run dev # or npm run dev
```

...and boom! You now have a running electron-vue app.  
![](../images/landing-page.jpg)

This boilerplate comes with a few landing-page components that are easily removable.



================================================
FILE: docs/en/end-to-end_testing.md
================================================
# End-to-End Testing

electron-vue makes use of [Spectron](http://electron.atom.io/spectron/) and the [Mocha](https://mochajs.org/) \(with [Chai](http://chaijs.com/)\) test framework for end-to-end testing. Mocha & Chai APIs, including `expect`, `should`, and `assert`, are made available in global scope.

### Running tests

```bash
# Begin Mocha
npm run e2e
```

##### Note

Before running end-to-end tests, a `npm run pack` is called to create a production build that Spectron can consume during tests.

### File Structure

```
my-project
├─ test
|  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ utils.js
```

**For the most part, you can ignore **`index.js`** and focus solely on writing **`specs/`**.**

#### `specs/`

Inside this directory is where actual tests are written. Thanks to the power of `babel-register`, you have full access to ES2015.

#### `index.js`

This file acts as the main entry to Mocha and gathers all tests written in `specs/` for testing.

#### `utils.js`

Here you will find generic functions that could be of use throughout your `specs/`. Base functions include a `beforeEach` and `afterEach` that handle the electron creation/destruction process.

### On the subject of Spectron

Spectron is the official [electron](http://electron.atom.io) testing framework that uses both [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) and [WebDriverIO](http://webdriver.io/) for manipulating DOM elements.

#### Using WebDriverIO

As stated in the Spectron [documentation](https://github.com/electron/spectron#client), access to [WebDriverIO APIs](http://webdriver.io/api.html) can be accessed through `this.app.client`. Since electron-vue uses Mocha, the context of `this` is shared between `afterEach`, `beforeEach`, and `it`. Because of this, it is important to note that ES2015 arrow functions cannot not be used in certain situations as the context of `this` will be overwritten \([more info](https://mochajs.org/#arrow-functions)\).



================================================
FILE: docs/en/entry_indexhtml.md
================================================
# Entry `index.html`

electron-vue makes use of [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-plugin) to create the `index.html` in production builds. During development you will find a `index.ejs` in the `src/` directory. It is here where you can make changes to your entry HTML file.

If you are unfamiliar with how this plugin works, then I'd encourage you take a look at its [documentation](https://www.npmjs.com/package/html-webpack-plugin). But in short, this plugin will automatically inject production assets including `renderer.js` and `styles.css` into a final minified `index.html`.

### `index.ejs` during development

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <%= ... %>
  </head>
  <body>
    <div id="app"></div>
    <!-- webpack builds are automatically injected -->
  </body>
</html>
```

### `index.html` in production \(non-minified\)

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>app</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div id="app"></div>
    <script type="text/javascript" src="renderer.js"></script>
  </body>
</html>
```

### On the subject of using CDNs

Although the benefits of using assets served from a CDN can be great for your application's final build size, I would advised against using them. The main reason being is that by doing so you are assuming the application always has access to the internet, which is not always the case for Electron apps. This becomes a rather major issue with CSS frameworks like bootstrap, as your app will quickly become an un-styled mess.

> "I don't care, I still want to use a CDN"

If you are determined to still use a CDN, then you can still do so by adding the tags to your `src/index.ejs` file. Just make sure to set up proper UI/UX flows for when you app is offline.



================================================
FILE: docs/en/faqs.md
================================================
# FAQs

* [Why is my electron app blank after running `npm run dev`?](#why-is-my-electron-app-blank-after-running-npm-run-dev)
* [Why does my electron app show a file explorer?](#why-does-my-electron-app-show-a-file-explorer)
* [Why is `vue-devtools`/`devtron` missing?](#why-is-vue-devtoolsdevtron-missing)
* [Where do I put Static Assets?](#where-do-i-put-static-assets)
* [Why did `npm run lint` end with an error?](#why-did-npm-run-lint-end-with-an-error)
* [Why can't I load my app in a web browser?](#why-cant-i-load-my-app-in-a-web-browser)
* [How do I import `jquery`?](#how-do-import-jquery)
* [How can I debug the `main` process?](#how-can-i-debug-the-main-process)

---

## Why is my electron app blank after running `npm run dev`?

#### TL;DR

Make sure you don't have a personal **proxy** setup that could tamper with `webpack-dev-server`.

## Why does my electron app show a file explorer?

#### TL;DR

Your `src/renderer` contains error\(s\). Check console, fix errors, then refresh electron with `CommandOrControl+R`.

##### Long answer

If error\(s\) are present in you `src/renderer` this creates conflicts with ESLint on first run. In turn, an INVALID webpack `renderer.js` is produced which interrupts `HtmlWebpackPlugin` from creating `index.html`. Since `webpack-dev-server` doesn't have the `index.html` ready to serve, the server falls back to the file explorer.

## Why is `vue-devtools`/`devtron` missing?

Make sure to close and reopen the developer tools panel on first launch if they are missing. Also check your terminal check for any error messages that may occur during installation.

## Where do I put Static Assets?

[**Using Static Assets**](using-static-assets.md)

## Why did `npm run lint` end with an error?

The default nature of eslint is to print linting errors to console, and if there is any found the script will end with a non-zero exit \(which produces npm errors\). This is normal behavior.

## Why can't I load my app in a web browser?

[\#195](https://github.com/SimulatedGREG/electron-vue/issues/195)

## How do import `jquery`?

If you are wanting to use `bootstrap`, I'm going to have to stop you right there. Using both `vue` and `jquery` in the same environment is a bad practice and leads to the two frameworks colliding with each other. I would highly recommend using a `bootstrap` alternative that uses `vue` for its JavaScript functionality. Some recommendations include [`bootstrap-vue`](https://github.com/bootstrap-vue/bootstrap-vue) and [`vue-strap`](https://github.com/yuche/vue-strap). For whatever reason you must use `jquery`, seek guidance from `webpack`'s documentation about the `ProvidePlugin` or see [\#192](https://github.com/SimulatedGREG/electron-vue/issues/192).

## How can I debug the `main` process?

When using `electron@^1.7.2` you can open up Google Chrome, head to `chrome://inspect`, and then pop open the remote electron process while your application is running in development mode.

[Electron Documentation](https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md)



================================================
FILE: docs/en/file-tree.md
================================================
# File Tree

### During development

**Note**: Some files/folders may differ based on the settings chosen during `vue-cli` scaffolding.

```
my-project
├─ .electron-vue
│  └─ <build/development>.js files
├─ build
│  └─ icons/
├─ dist
│  ├─ electron/
│  └─ web/
├─ node_modules/
├─ src
│  ├─ main
│  │  ├─ index.dev.js
│  │  └─ index.js
│  ├─ renderer
│  │  ├─ components/
│  │  ├─ router/
│  │  ├─ store/
│  │  ├─ App.vue
│  │  └─ main.js
│  └─ index.ejs
├─ static/
├─ test
│  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ utils.js
│  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ karma.config.js
│  └─ .eslintrc
├─ .babelrc
├─ .eslintignore
├─ .eslintrc.js
├─ .gitignore
├─ package.json
└─ README.md
```

#### Production builds

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```

As you can probably tell, almost everything is stripped down in final production builds. This is almost mandatory when distributing electron apps, as you do not want your users to download bloated software with a large file size.







================================================
FILE: docs/en/getting_started.md
================================================
# Getting Started

## Scaffolding

This boilerplate was built as a template for [vue-cli](https://github.com/vuejs/vue-cli) and includes options to customize your final scaffolded application. The use of `node@^7` or higher is required. electron-vue also officially recommends the [`yarn`](https://yarnpkg.org) package manager as it handles dependencies much better and can help reduce final build size with `yarn clean`.

```bash
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# Install dependencies and run your app
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

#### On the subject of electron

Although optional, it is recommended to lock in your electron version after scaffolding your project. This helps prevent other developers working on the same project from developing on a different version. Electron makes releases quite often so features are always subject to change. [More Info](http://electron.atom.io/docs/tutorial/electron-versioning/).

#### A note for Windows Users

If you run into errors during `npm install` about `node-gyp`, then you most likely do not have the proper build tools installed on your system. Build tools include items like Python and Visual Studio. Thanks to [@felixrieseberg](https://github.com/felixrieseberg), there are a few packages to help simplify this process.

The first item we need to check is our npm version and ensure that it is not outdated. This can is accomplished using [`npm-windows-upgrade`](https://github.com/felixrieseberg/npm-windows-upgrade). If you are using `yarn`, then you can skip this check.

Once that is complete, we can then continue to setup the needed build tools. Using [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools), most of the dirty work is done for us. Installing this globally will in turn setup Visual C++ packages, Python, and more.

At this point things should successfully install, but if not then you will need a clean installation of Visual Studio. Please note that these are not direct problems with electron-vue itself \(Windows can be difficult sometimes ¯\\\_\(ツ\)\_/¯\).



================================================
FILE: docs/en/global_configuration.md
================================================
# Global Configuration

electron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre-processing, bundling, and building your app. The default settings are rather common and should meet most of your needs. An additional `config.js` is provided in the root directory for quick adjustments. Further customization can be made by directly adjusting `webpack.main.config.js` and `webpack.renderer.config.js`.

#### `config.js`
**Note**: Some options may differ based on the settings choosen during `vue-cli` scaffolding.

```js
{
  // Name of electron app
  // Will be used in production builds
  name: 'app',

  // Use ESLint
  // Further changes can be made in `.eslintrc.js`
  eslint: true,

  // webpack-dev-server port
  port: 9080,

  // electron-packager options
  // See `Building you app` for more info
  building: {
    arch: 'x64',
    asar: true,
    dir: path.join(__dirname, 'app'),
    icon: path.join(__dirname, 'app/icons/icon'),
    ignore: /\b(src|index\.ejs|icons)\b/,
    name: pkg.name,
    out: path.join(__dirname, 'builds'),
    overwrite: true,
    platform: process.env.PLATFORM_TARGET || 'all'
  }
}
```


================================================
FILE: docs/en/main-process.md
================================================
# Main Process

> In Electron, the process that runs package.json’s main script is called the main process. The script that runs in the main process can display a GUI by creating web pages.

**From the **[**Electron Documentation**](http://electron.atom.io/docs/tutorial/quick-start/#main-process)

---

Since the `main` process is essentially a full node environment, there is no initial project structure other than two files.

#### `src/main/index.js`

This file is your application's main file, the file in which `electron` boots with. It is also used as `webpack`'s entry file for production. All `main` process work should start from here.

#### `app/src/main/index.dev.js`

This file is used specifically and only for development as it installs `electron-debug` & `vue-devtools`. There shouldn't be any need to modify this file, but it can be used to extend your development needs.

## On the subject of using `__dirname` & `__filename`

Since the `main` process is bundled using `webpack`, the use of `__dirname` & `__filename` **will not** provide an expected value in production. Referring to the [**File Tree**](/file-tree.md), you'll notice that in production the `main.js` is placed inside the `dist/electron` folder. Based on this knowledge, use `__dirname` & `__filename` accordingly.

**If you are in need of a path to your `static/` assets directory, make sure to read up on **[**Using Static Assets**](/using-static-assets.md)** to learn about the super handy `__static` variable.**

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```





================================================
FILE: docs/en/meta.md
================================================
# Meta

### Thank You

Wow, thank you guys so much for helping make electron-vue one of the top 3`vue-cli`templates \(that I can find\) on GitHub. I never thought this project would ever take off like it has today. Thinking back, I originally made this boilerplate \(in **May 2016**\) for a personal closed sourced project and decided to open source \(the boilerplate itself\) when I knew I had a majority of the pieces together. Fast-forward to today and there have been so many new features implemented and amazing support from the community. I also want to give a special shoutout to those in the community helping answer issues when I'm not able to. You guys have absolutely no obligation to do anything but you do anyway, and I am grateful for that.

If you are reading this, then I can almost assume you really do enjoy electron-vue. A lot of time was spent creating this boilerplate. If you are feeling generous, then feel free to leave a tip if you want. Surely future development of electron-vue is not dependent upon donations, but its always an option if you decide to use it.

#### [**PayPal.me**](https://www.paypal.me/simulatedgreg/5) 





================================================
FILE: docs/en/migration-guide.md
================================================
# Migration Guide

The following documentation attempts to explain how migrating your project _should_ be accomplished, but may not be a full proof method as overall project structure is always up for change.

1. Scaffold a fresh version of electron-vue using `vue init simulatedgreg/electron-vue my-project`
2. Copy over current project `src` files into the new scaffold's `src` directory
3. Copy over `package.json` dependencies from current project to the new scaffold's `package.json`
4. Install dependencies with `yarn` or `npm install`
5. Run project in development mode \(`yarn run dev` or `npm run dev`\)
6. Watch console for errors to fix

Just as previously mentioned above, there isn't a full proof method for migrating to a new scaffold, but these are typically going to be the major steps to get you nearly all the way there. Any personal modifications to project structure or handling of assets will be up to you or your team to migrate. Make sure to check out the rest of the documentation as it will always reflect the current version of electron-vue from the `master` branch.



================================================
FILE: docs/en/miscellaneous.md
================================================


================================================
FILE: docs/en/new-releases.md
================================================
# New Releases

electron-vue has evolved greatly since its initial creation in May of 2016 and has introduced many new fantastic features. Can you believe there was a time `vue-cli` scaffolding wasn't supported? Development of new features is not planned to end anytime soon. The only down side to new bells & whistles every now and then is having your project stuck on an older scaffold. Since electron-vue takes advantage of `vue-cli` there unfortunately isn't a structured way to _version_ the boilerplate or make it _updatable_.

Major updates of electron-vue will be made through GitHub Milestones and will include many new features/bug fixes at a time, making these releases the optimal time to [migrate](/migration-guide.md) any existing projects to a newer scaffold. These milestones are not usually planned, but arise as feature requests add up in the issue tracker.

### Past Milestones

#### [Multiplex](https://github.com/SimulatedGREG/electron-vue/milestone/1?closed=1)

* Migration to `webpack` 2
* Support for `electron-builder`
* Support for `main` process bundling
* General bugfixing

#### [Minimize](https://github.com/SimulatedGREG/electron-vue/issues/171)

* Migration to single `package.json` structure
* Travis CI / AppVeyor configs for `electron-builder` users
* Minimal web output of `renderer` process
* Migration to `axios`
* Full support for `main` process bundling
* Rewrite of development and build scripts
* Migration to `babili` to remove the need of transpiling down completely to ES5
* Support for `static/` assets when using modules that require a full path \([`__static`](/using-static-assets.md)\)





================================================
FILE: docs/en/npm_scripts.md
================================================
# NPM Scripts

To help eliminate redundant tasks around the development process, please take note of some of the NPM scripts available to you. The following commands should be ran from your project's root directory. And of course, you can run any of the below commands using `yarn run <command>`.

### `npm run build`

Build your app for production and package. More info can be found in the [**Building Your App**](building_your_app.md) section.

### `npm run dev`

Run app in development.

You can also pass command line paramaters to the application with: 

    npm run dev --arg1=val1 --arg2

### `npm run lint`

Lint all your `src/`'s and `test/`'s JS & Vue component files.

### `npm run lint:fix`

Lint all your `src/`'s and `test/`'s JS & Vue component files and attempt to fix issues.

### `npm run pack`

Run both `npm run pack:main` & `npm run pack:renderer`. Although these commands are available, there are not many cases where you will need to manually do this as `npm run build` will handle this step.

### `npm run pack:main`

Run webpack to bundle `main` process source code.

### `npm run pack:renderer`

Run webpack to bundle `renderer` process source code.

### `npm run unit`

Run unit tests with Karma + Jasmine. More information on [**Unit Testing**](unittesting.md).

### `npm run e2e`

Run end-to-end tests with Spectron + Mocha. More information on [**End-to-end Testing**](end-to-end_testing.md).

### `npm test`

Runs both `npm run unit` & `npm run e2e`. More information on [**Testing**](testing.md).



================================================
FILE: docs/en/project_structure.md
================================================
# Project Structure

When it comes to making electron apps, project structure is a little different. If you have used the official [`vuejs-templates/webpack`](https://github.com/vuejs-templates/webpack) setup before, then the structure should feel quite familiar. The documentation in this section attempts to explain a general overview of how the boilerplate works and the differences when your application is built.

### Single `package.json` Setup

There was a time not too long ago where a two `package.json` setup was neccessary, but thanks to efforts from [@electron-userland](https://github.com/electron-userland), both [`electron-packager`](https://github.com/electron-userland/electron-packager) and [`electron-builder`](https://github.com/electron-userland/electron-builder) now fully support a single `package.json` setup.

#### `dependencies`

These dependencies **will** be included in your final production app. So if your application needs a certain module to function, then install it here!

#### `devDependencies`

These dependencies **will not** be included in your final production app. Here you can install modules needed specifically for development like build scripts, `webpack` loaders, etc.

#### Installing Native NPM Modules

We need to make sure our native npm modules are built against electron. To do that, we can use [`electron-rebuild`](https://github.com/electron/electron-rebuild), but to make things simpler, it is highly recommended to use [`electron-builder`](https://github.com/electron-userland/electron-builder) for your build tool as a lot of these tasks are handled for you.

### On the subject of the `main` process

During development you may notice `src/main/index.dev.js`. This file is used specifically for development and is used to install dev-tools. This file should not have to be modified, but can be used to extend your development needs. Upon building, `webpack` will step in and create a bundle with `src/main/index.js` as its entry file.


================================================
FILE: docs/en/renderer-process.md
================================================
# Renderer Process

> Since Electron uses Chromium for displaying web pages, Chromium’s multi-process architecture is also used. Each web page in Electron runs in its own process, which is called the renderer process.
>
> In normal browsers, web pages usually run in a sandboxed environment and are not allowed access to native resources. Electron users, however, have the power to use Node.js APIs in web pages allowing lower level operating system interactions.

**From the **[**Electron Documentation**](http://electron.atom.io/docs/tutorial/quick-start/#renderer-process)

---

## On the subject of `vue` and `vuex`

### vue components

If you are unfamiliar with Vue components, please give [this](http://vuejs.org/v2/guide/single-file-components.html) a read. Using components gives our large complex applications more organization. Each component has the ability to encapsulate its own CSS, template, and JavaScript functionality.

Components are stored in `src/renderer/components`. When creating child components, a common organization practice is to place them inside a new folder with the name of its parent component. This is especially useful when coordinating different routes.

```
src/renderer/components
├─ ParentComponentA
│  ├─ ChildComponentA.vue
│  └─ ChildComponentB.vue
└─ ParentComponentA.vue
```

### vue routes

For more information about `vue-router` click [here](https://github.com/vuejs/vue-router). In short, it is encouraged to use `vue-router` as creating a Single Page Application is much more practical when making Electron applications. Do you really want to manage a bunch of BrowserWindows and then communicating information between everything? Probably not.

Routes are held in `src/renderer/router/index.js` and defined like so...

```js
{
  path: '<routePath>',
  name: '<routeName>',
  component: require('@/components/<routeName>View')
}
```

...where both `<routePath>` and `<routeName>` are variables. These routes are then attached to the component tree using the `<router-view>` directive in `src/renderer/App.vue`.

##### Notice

When using `vue-router`, do not use [**HTML5 History Mode**](http://router.vuejs.org/en/essentials/history-mode.html). This mode is strictly meant for serving files over the `http` protocol and does not work properly with the `file` protocol that Electron serves files with in production builds. The default `hash` mode is just what we need.

### vuex modules

Describing `vuex` is not the easiest thing to do, so please read [this](https://vuex.vuejs.org/guide/) for a better understanding of what problem it tries to solve and how it works.

electron-vue takes advantage of `vuex`'s module structure to create multiple data stores, which are saved in `src/renderer/store/modules`.

Having multiple data stores can be great for organization, but it can also be annoying to have to import each and every one. But don't fret, as `src/renderer/store/modules/index.js` does the dirty work for us! This little script lets `src/renderer/store/index.js` import all of our modules in a one-shot manner. If all that didn't make sense, just know you can easily duplicate the given `Counter.js` module and it will be loaded in "magically".


================================================
FILE: docs/en/savingreading-local-files.md
================================================
# Read & Write Local Files

One great benefit of using `electron` is the ability to access the user's file system. This enables you to read and write files on the local system. To help avoid Chromium restrictions and writing to your application's internal files, make sure to take use of `electron`'s APIs, specifically the [`app.getPath(name)`](https://electron.atom.io/docs/api/app/#appgetpathname) function. This helper method can get you file paths to system directories such as the user's desktop, system temporary files, etc.

### Use Case

Let's say we want to have a local database store for our application. In this example we'll demonstrate with [`nedb`](https://github.com/louischatriot/nedb).

```bash
yarn add nedb # or npm install nedb --save
```

**src/renderer/datastore.js**

Here we setup NeDB and point it to our `userData` directory. This space is reserved specifically for our application, so we can have confidence other programs or other user interactions should not tamper with this file space. From here we can import `datastore.js` in our `renderer` process and consume it.

```js
import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'

export default new Datastore({
  autoload: true,
  filename: path.join(remote.app.getPath('userData'), '/data.db')
})
```

If we want to setup multiple databases across different files in to our `userData` directory, we can wrap the Datastore into a function and export many databases.

```js
import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'

const dbFactory = file =>
  new Datastore({
    filename: `${path.join(remote.app.getPath('userData'))}/data/${file}`,
    autoload: true
  })

const db = {
  users: dbFactory('users.db'),
  config: dbFactory('config.db')
}

export default db
```

**src/renderer/main.js**

To take this a step further, we can then import our datastore into `src/renderer/main.js` and attach it to the Vue prototype. Doing so, we are now able to access the datastore API through the usage of `this.$db` in all component files. If we had multiple databases, we are able to acces throught the usage of `this.$db.{database-name}`.

```js
import db from './datastore'

/* Other Code */

Vue.prototype.$db = db
```





================================================
FILE: docs/en/testing.md
================================================
# Testing

electron-vue supports both unit testing and end-to-end testing for the `renderer` process and is heavily inspired by the testing setup provided with the official `vuejs-templates/webpack` boilerplate. During `vue-cli` scaffolding you will have the option to include testing support.

## [Unit testing](unittesting.md)

Run unit tests with Karma + Mocha

```bash
npm run unit
```

## [End-to-end testing](end-to-end_testing.md)

Run end-to-end tests with Spectron + Mocha

```bash
npm run e2e
```

## Running all tests

```bash
npm test
```

### On the subject of CI testing

If your decided to use `electron-builder` as your build tool when scaffolding, then you can easily test your application on both Travis CI & AppVeyor for `darwin`, `linux`, and `win32`. Inside both `.travis.yml` and `appveyor.yml` you will find commented sections you can quickly un-comment to enable testing. Make sure to read up on [**Automated Deployments using CI**](using-electron-builder.md#automated-deployments-using-ci)** **for further information.



================================================
FILE: docs/en/unittesting.md
================================================
# Unit Testing

electron-vue makes use of the [Karma](https://karma-runner.github.io/1.0/index.html) test runner and the [Mocha](https://mochajs.org/) test framework \(with [Chai](http://chaijs.com/)\) for unit testing.

Both Mocha and Chai are integrated using `karma-mocha` and `karma-chai` respectively, so all APIs such as `expect` are globally available in test files.

### Running Tests

```bash
# Begin Karma
npm run unit
```

### File Structure

```
my-project
├─ test
|  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ karma.conf.js
```

**For the most part, you can ignore both **`index.js`** and **`karma.conf.js`** and focus solely on writing **`specs/`**.**

#### `specs/`

Inside this directory is where actual tests are written. Thanks to the power of webpack, you have full access to ES2015 and supported loaders.

#### `index.js`

This is the entry file used by `karma-webpack`. The purpose of this file is to gather all test and source code in a "one-shot" manner.

#### `karma.conf.js`

Here you will find the actual `karma` configuration, set up with spec/coverage reporters. Further customization can be made in accordance to the [official karma documentation](http://karma-runner.github.io/1.0/config/configuration-file.html).

### Mocking Dependencies

electron-vue comes with [`inject-loader`](https://github.com/plasticine/inject-loader) installed by default. For usage with Vue component files see [`vue-loader` docs on testing with mocks](http://vue-loader.vuejs.org/en/workflow/testing-with-mocks.html).



================================================
FILE: docs/en/using-electron-builder.md
================================================
# Using [`electron-builder`](https://github.com/electron-userland/electron-builder)

All builds produced by `electron-builder` can be found within the `build` directory.

#### Building

```bash
npm run build
```

#### Building unpacked directory

Produce simple executable without full installer. Useful for quick testing.

```bash
npm run build:dir
```

### Default building configuration

Further customization can be made at `package.json` in accordance to `electron-builders`'s options found [here](https://github.com/electron-userland/electron-builder/wiki/Options).

```js
"build": {
  "productName": "ElectronVue",
  "appId": "org.simulatedgreg.electron-vue",
  "dmg": {
    "contents": [
      {
        "x": 410,
        "y": 150,
        "type": "link",
        "path": "/Applications"
      },
      {
        "x": 130,
        "y": 150,
        "type": "file"
      }
    ]
  },
  "directories": {
    "output": "build"
  },
  "files": [
    "dist/electron",
    "node_modules/",
    "package.json"
  ],
  "mac": {
    "icon": "build/icons/icon.icns"
  },
  "win": {
    "icon": "build/icons/icon.ico"
  },
  "linux": {
    "icon": "build/icons"
  }
}
```

## Automated Deployments using CI

When using electron-vue's `electron-builder` configuration, you are also provided a `appveyor.yml` and `.travis.yml` for automated deployments. Both config files are setup for building your electron application and pushing artifacts to a GitHub release, Bintray, etc. Travis CI is used to build both `linux` and `darwin` \(macOS\) while AppVeyor is used to build `win32`. Both services are free for OSS projects.

#### Setting up Travis CI/AppVeyor

1. Create an account over at [Travis CI](https://travis-ci.org/getting_started) / [AppVeyor](https://www.appveyor.com/)
2. Link your GitHub repository that has your electron-vue project
3. Visit [https://github.com/settings/tokens](https://github.com/settings/tokens) and hit **Generate new token **\(the same token can be used for both Travis CI & AppVeyor\)
   1. Set a **Token description**
   2. Check the **public\_repo **scope
   3. Hit **Generate token**
4. Copy your new token and save for later
5. Open your repository settings on Travis CI / AppVeyor to add a new **Environment Variable**
   1. Set the name of the variable to `GH_TOKEN`
   2. Set the value of the variable to the GitHub access token you just created
   3. **Save** the new variable and ensure encryption is enabled

At this point, everything should be setup. Travis CI/AppVeyor by default will watch for any pushes to your `master` branch. When a push is made, Travis CI/AppVeyor will then clone down your repository to its server and begin the build process. During the final stages, `electron-builder` with see the `GH_TOKEN` environment variable and create a draft release and upload the artifacts to your public GitHub repository. From this point, you can edit the draft release and then publish it to the world. After publishing your release, make sure future releases are marked with a new version number by updating your `package.json`.

#### Auto Updating

Enabling your application to receive automatic updates is a super nice feature to have, but know that [**Code Signing**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing) is required. You can setup code signing by adding a few more environment variables based on what `electron-builder` needs described [here](https://www.electron.build/code-signing). Once you have your certificates setup, you can then install `electron-updater` and comment out the chunk of code at the bottom of `src/main/index.js` to enable auto updating.

If you are like most people and do not have a fancy code signing certificate, then you can always use the GitHub API to check for new releases. When a new release is detected, provide a notification within your application to point users to a download page where they can download and install the new build. Thanks to the amazing installer that `electron-builder` provides, user's do not have to uninstall the current version and the new installation will replace the old while still persisting any web storage or `userData` files.



================================================
FILE: docs/en/using-electron-packager.md
================================================
# Using [`electron-packager`](https://github.com/electron-userland/electron-packager)

All builds produced by `electron-packager` can be found within the `build` folder.

#### Building for all platforms

Please know that not all Operating Systems can build for all other platforms.

```bash
npm run build
```

#### Building for a specific platform

Platforms include `darwin`, `mas`, `linux` and `win32`.

```bash
# build for darwin (macOS)
npm run build:darwin
```

#### Cleaning

Delete all builds from `build`.

```bash
npm run build:clean
```

### A note for non-Windows users

If you are wanting to build for Windows **with a custom icon** using a non-Windows platform, you must have [wine](https://www.winehq.org/) installed. [More Info](https://github.com/electron-userland/electron-packager#building-windows-apps-from-non-windows-platforms).

### Default building configurations

Further customization can be made at `.electron-vue/build.config.js` in accordance to `electron-packager`'s options found [here](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options). The name applied to your built application is set with the `productName` value in your `package.json`.

```js
{
    // Target 'x64' architecture
    arch: 'x64',

    // Compress app using 'electron/asar'
    asar: true,

    // Directory of the app
    dir: path.join(__dirname, '../'),

    // Set electron app icon
    // File extensions are added based on platform
    //
    // If building for Linux, please read
    // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon
    icon: path.join(__dirname, '../build/icons/icon'),

    // Ignore files that would bloat final build size
    ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,

    // Save builds to `builds`
    out: path.join(__dirname, '../build'),

    // Overwrite existing builds
    overwrite: true,

    // Environment variable that sets platform
    platform: process.env.BUILD_TARGET || 'all'
}
```





================================================
FILE: docs/en/using-static-assets.md
================================================
# Using Static Assets

If you have used the official `vuejs-templates/webpack` boilerplate before, then you should be familiar with the `static/` directory. It is here where you can place static assets that both the `main` and `renderer` process can consume. Using these assets within your Vue application is simple, but usage with `fs` and other modules that need a full path can be a little tricky. Thankfully, electron-vue provides a `__static` variable that yields the path to the `static/` directory in both development and production.

### Use Case within `src` tags in Vue Components

Let's say I have a component that loads an image, but the image's path isn't known until some other task is completed. To keep things simple, let's just use a `data` variable to bind our `<img>`'s src.

**SomeComponent.vue**

```html
<template>
  <img v-bind:src="imageUrl">
</template>

<script>
  export default {
    data () {
      // notice the url starts with `static/`
      return { imageUrl: 'static/imgs/unsplash.png' }
    }
  }
</script>
```

Here `webpack` will not bundle the `unsplash.png` image and the application will look inside the `static/imgs/unsplash.png` directory for the asset. Thanks to `vue-loader`, all of the dirty work is done for us.

### Use Case within JS with `fs`,`path` and `__static`

Let's say we have a static asset that we need to read into our application using `fs`, but how do we get a reliable path, in both development and production, to the `static/` directory? electron-vue provides a global variable named `__static` that will yield a proper path to the `static/` directory. Here's how we can use it to read a simple text file in both development and production.

**static/someFile.txt**

```txt
foobar
```

**SomeFile.js \(**`main`** or **`renderer`** process\)**

```js
import fs from 'fs'
import path from 'path'

let fileContents = fs.readFileSync(path.join(__static, '/someFile.txt'), 'utf8')

console.log(fileContents)
// => "foobar"
```

Please note that in production all files are packed with [`asar`](https://github.com/electron/asar) by default as it is highly recommended. Because of this, assets within the `static/` folder can only be accessed within `electron` since it is aware of this behavior. So if you are planning to distribute files to your users, that can for example open in a external program, you would first need to copy those assets from your application into the user's document space or desktop. From there you could use the [`shell.openItem()`](https://electron.atom.io/docs/api/shell/#shellopenitemfullpath) electron API to open those assets.

An alternative method to this situation would be to configure `electron-packager`/`electron-builder` to set specific files to "unpack" from the `asar` archive in production. electron-vue has no plans to support this method; any issues related to this or how to set this up will be closed.



================================================
FILE: docs/en/using_css_frameworks.md
================================================
# Using CSS Frameworks

Although this may seem like a no brainer, I'd suggest you import your third-party CSS libraries into webpack using the [`style-loader`](https://github.com/webpack/style-loader), which is already setup for you.

## Use Case

Say you want to use [bootstrap](http://getbootstrap.com/), [bulma](http://bulma.io/), or [materialize](http://materializecss.com/) for your application. Go ahead and install your library from `npm` like you normally would, but instead of attaching the asset to `index.ejs` we will import the CSS in our JavaScript, specifically in `src/renderer/main.js`.

#### Example

Let's install `bulma`

```bash
npm install bulma --save
```

Then inside `src/renderer/main.js` let's add this line.

```bash
import 'bulma/css/bulma.css'
```

Alternatively, you can also include `bulma` from inside a component file.

**App.vue**

```html
<style>
  @import "~bulma/css/bulma.css";
</style>
```

Now `webpack` will know to load in `bulma` for our application and make it available in our production builds.



================================================
FILE: docs/en/using_pre-processors.md
================================================
# Using Pre-Processors

One of the great benefits of using [`vue-loader`](https://github.com/vuejs/vue-loader) with [`webpack`](https://github.com/webpack/webpack) is the ability to pre-process your HTML/CSS/JS directly in your Vue components files without much effort at all. For more information about this check [**here**](https://vuejs.org/v2/guide/single-file-components.html).

## Use Case

Let's say we need to use Sass/SCSS for pre-processing our CSS. First, we need to install the proper `webpack` loader to handle this syntax.

#### Installing `sass-loader`

```bash
npm install --save-dev sass-loader node-sass
```

Once the loader we need is installed, everything is pretty much finished. `vue-loader` will magically take care of the rest. Now we can easily add `lang="sass"` or `lang="scss"` to our Vue component files. Notice we also installed `node-sass` as it is a dependent package for `sass-loader`.

#### Applying the `lang` attribute

So...

```html
<style>
  body {
    /* CSS */
  }
</style>
```

...now becomes...

```html
<style lang="scss">
  body {
    /* SCSS */
  }
</style>
```

The same principles apply for just about any other pre-processor. So maybe you need coffeescript for your JS? Simply install the [coffeescript-loader](https://github.com/webpack/coffee-loader) and apply the `lang="coffeescript"` attribute to your `<script>` tag.

For more advanced use of this feature please head over to the [vue-loader documentation](http://vue-loader.vuejs.org/en/configurations/pre-processors.html) for more information.

## Using Sass/SCSS globals

When using Sass/SCSS for your CSS syntax, it's very beneficial to make use of global variables/mixins throughout all Vue component files. Here's how to make that happen.

### Use Case

This example demonstrates how to apply a `globals.scss` to all Vue component files. This documentation assumes you have already setup `sass-loader` in your development environment as mentioned above.

#### Define your globals

**src/renderer/globals.scss**

```scss
$brand-primary: blue;
$brand-accent: turquoise;
```

#### Inject `globals.scss` directly into `node-sass`

Edit the `vue-loader` config in **.electron-vue/webpack.renderer.config.js**

```js
loaders: {
  sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1&data=@import "./src/renderer/globals"',
  scss: 'vue-style-loader!css-loader!sass-loader?data=@import "./src/renderer/globals";'
}
```

In some cases it doesn't work, you may edit `scss` and `sass` directly

```js
{
  test: /\.scss$/,
  use: ['vue-style-loader', 'css-loader', 'sass-loader?data=@import "./src/renderer/globals";']
},
{
  test: /\.sass$/,
  use: ['vue-style-loader', 'css-loader', 'sass-loader?data=@import "./src/renderer/globals";']
},
```

#### Use your globals

**SomeComponent.vue**

```html
<style lang="scss">
  body { color: $brand-primary; }
</style>
```





================================================
FILE: docs/en/using_the_file_structure.md
================================================
# Using the File Structure

electron-vue does its best to not force a particular project structure, but does try to follow common Vue & Electron practices. The following documentation describes common practices used in the original project structure.

**If you are unfamiliar with Electron's **`renderer`** and **`main`** processes, please give the first section of the **[**Quick Start**](http://electron.atom.io/docs/tutorial/quick-start)** a good read. It explains, in detail, their differences.**

### [Renderer Process](renderer-process.md)

### [Main Process](main-process.md)





================================================
FILE: docs/en/vue_accessories.md
================================================
# Vue Plugins

electron-vue comes packed with the following `vue` plugins that can be installed during `vue-cli` scaffolding...

* [axios ](https://github.com/mzabriskie/axios)\(web requests\)
* [vue-electron](https://github.com/SimulatedGREG/vue-electron) \(attach electron APIs to Vue object\)
* [vue-router](https://github.com/vuejs/vue-router) \(single page application routes\)
* [vuex](https://github.com/vuejs/vuex) \(flux-inspired application architecture\)
* [vuex-electron](https://github.com/vue-electron/vuex-electron) \(sync vuex store between all processes and instances\)

---

### [`axios`](https://github.com/mzabriskie/axios)

> Promise based HTTP client for the browser and node.js

If you are familiar with `vue-resource`, then `axios` will feel very familiar as most of the API is nearly identical. You can easily import `axios` in your `main` process scripts or use with `this.$http` & `Vue.http` in the `renderer` process. Please note that during development you may run into issues with CORS since requests are passed through `webpack-dev-server`. As a small workaround, you can disable [`webSecurity`](https://electronjs.org/docs/api/browser-window#new-browserwindowoptions) within the BrowserWindow configuration, but please do remember to only disable this during development. Disabling this in production is highly not recommended and can create a serious security risk for your final application!

### [`vue-electron`](https://github.com/SimulatedGREG/vue-electron)

> The vue plugin that attaches electron APIs to the Vue object, making them accessible to all components.

A simple `vue` plugin that makes electron APIs easily accessible with`this.$electron`, no longer needing to import `electron` into every component necessary.

### [`vue-router`](https://github.com/vuejs/vue-router)

> `vue-router` is the official router for [Vue.js](http://vuejs.org/). It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze.

The provided project structure should feel familiar to the setup provided in the official `vuejs-templates/webpack` boilerplate.

### [`vuex`](https://github.com/vuejs/vuex)

> Vuex is a **state management pattern + library **for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion.

The provided project structure is rather bare but does encourage the use of `vuex`'s module pattern to help organize your data stores. The extra `@/store/modules/index.js` let's your `vuex` store import all modules in a one-shot manner.

### [`vuex-electron`](https://github.com/vue-electron/vuex-electron)

> The easiest way to use your Vuex store between all processes (including main) and instances.

In case if your application has multiple windows, probably you would need to share the state of the application between them. Moreover, probably you would need to share the state of the app between launches or different instances. You could easily solve these two tasks by using `vuex-store`.


================================================
FILE: docs/en/webpack-configurations.md
================================================
# Webpack Configurations

electron-vue comes packed with three separate webpack config files located in the `.electron-vue/` directory. Aside for the optional use of the `web` output, both `main` and `renderer` are similar in setup. Both make use of `babel-preset-env` to target `node@7` features, use `babili`, and treat all modules as `externals`.

### `.electron-vue/webpack.main.config.js`

Targets electron's `main` process. This configuration is rather bare, but does include some common `webpack` practices.

### `.electron-vue/webpack.renderer.config.js`

Targets electron's `renderer` process. This configuration handles your Vue application, so it includes `vue-loader` and many other configurations that are available in the official `vuejs-templates/webpack` boilerplate.

##### White-listing Externals

One important thing to consider about this config is that you can whitelist specific modules to not treat as webpack `externals`. There aren't many use cases where this functionality is needed, but for the case of Vue UI libraries that provide raw `*.vue` components they will need to be whitelisted, so `vue-loader` is able to compile them. Another use case would be using webpack `alias`es, such as setting `vue` to import the full Compiler + Runtime build. Because of this, `vue` is already in the whitelist.

### `.electron-vue/webpack.web.config.js`

Targets building your `renderer` process source code for the browser. This config is provided as a strong starting base if you are in need of publishing to web. **electron-vue does not support web output further than what is provided.** Issues related to web output will most likely be deferred or closed.



================================================
FILE: docs/ja/README.md
================================================
![](../images/logo.png)

> vue で構築された electron アプリケーションを作成するためのボイラープレートです(名前から分かるように)。

[![Build Status](https://semaphoreci.com/api/v1/simulatedgreg/electron-vue/branches/master/badge.svg)](https://semaphoreci.com/simulatedgreg/electron-vue)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)

## 概要

このプロジェクトは vue を使用した electron アプリケーションの手動セットアップをなくすことを目標としています。electron-vue はスキャフォールディングのために `vue-cli` 、 `vue-loader` と `webpack`、 `electron-packager` または `electron-builder`、 `vue-router` や `vuex` などの最も使われているプラグインを使用します。

#### ドキュメントは [こちら](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html)を確認してください。

このボイラープレートで見つけることができるもの...

- **単一の** `package.json` セットアップによる基本的なプロジェクト構造 
- 詳細な[ドキュメント](https://simulatedgreg.gitbooks.io/electron-vue/content/)
- [vue-cli](https://github.com/vuejs/vue-cli) を使用したプロジェクトスキャフォールディング
- Vue プラグイン ([axios](https://github.com/mzabriskie/axios), [vue-electron](https://github.com/SimulatedGREG/vue-electron), [vue-router](https://github.com/vuejs/vue-router), [vuex](https://github.com/vuejs/vuex))を使用する準備ができています*
- 開発のために [vue-devtools](https://github.com/vuejs/vue-devtools) や [devtron](https://github.com/electron/devtron) ツールのインストール
- [electron-packager](https://github.com/electron-userland/electron-packager) や [electron-builder](https://github.com/electron-userland/electron-builder) を使用して簡単にアプリケーションをパッケージングする機能*
- [electron-builder](https://github.com/electron-userland/electron-builder) による自動デプロイのための `appveyor.yml` と `.travis.yml` の設定*
- ブラウザ用の Web 出力を生成する機能
- 便利な [NPM scripts](/npm_scripts.md)
- Hot Module Replacement を伴う [webpack](https://github.com/webpack/webpack) と [vue-loader](https://github.com/vuejs/vue-loader) の使用
- electron の `main` プロセスで動いているプロセスの再起動
- [vue-loader](https://github.com/vuejs/vue-loader/) による HTML/CSS/JS プリプロセッサのサポート 
- ES6 のデフォルトは [`stage-0`](https://babeljs.io/docs/plugins/preset-stage-0/) です
- ES5 へトランスパイルする必要をなくすために [`babili`](https://github.com/babel/babili) の使用
- ESLint ([`standard`](https://github.com/feross/standard) と [`airbnb-base`](https://github.com/airbnb/javascript) スタイルのサポート)*
- (Karma と Mocha を使用した)ユニットテスト*
- (Spectron と Mocha を使用した)エンドツーエンドテスト*

*の箇所は `vue-cli` のスキャフォールディング中にカスタマイズ可能です

### はじめに

このボイラープレートは [`vue-cli`](https://github.com/vuejs/vue-cli) のテンプレートとして作成され、スキャフォールディングされたアプリケーションをカスタマイズするためのオプションが含まれています。`node@^7` かそれ以上のバージョンを使用する必要があります。electron-vue はパッケージマネージャの [`yarn`](https://yarnpkg.org) を公式に推奨しています。依存関係をよりよく処理し、`yarn clean` により最終的なビルドサイズを減らすことができます。

```bash
# vue-cli をインストールしボイラープレートをスキャフォールディングします
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project
# 依存関係をインストールし、アプリケーションを実行します
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

##### Windows ユーザーですか?

[**Windows ユーザーのための注意**](https://simulatedgreg.gitbooks.io/electron-vue/content/ja/getting_started.html#a-note-for-windows-users)を確認し、electron や他の依存関係で必要なビルドツールが全てあることを確認してください。

##### Vue 1 を使いたいですか?

`1.0`  ブランチを参照してください。electron-vue は `vue@^1` の使用を公式に推奨していないため、プロジェクトの構造、機能やドキュメントは これらの変更を反映していることに注意してください([**旧版のドキュメント**](https://github.com/SimulatedGREG/electron-vue/tree/1.0/docs))。

```bash
vue init simulatedgreg/electron-vue#1.0 my-project
```

### 次のステップ

[ドキュメント](https://simulatedgreg.gitbooks.io/electron-vue/content/) を確認してください。こちらから設定、プロジェクト構造、アプリケーションのビルドに関する有益な情報を得ることができます。便利な [FAQ](https://simulatedgreg.gitbooks.io/electron-vue/content/ja/faqs.html) セクションもあります。

## electron-vue で作られたもの

electron-vue で作られたいくつかの素晴らしいプロジェクトを見てみましょう。自身のプロジェクトをリストに追加したいですか?遠慮なくプルリクエストを送ってください。

- [**Surfbird**](https://github.com/surfbirdapp/surfbird): Electron と Vue で作られた Twitter クライアント
- [**Lulumi-browser**](https://github.com/qazbnm456/lulumi-browser): Lulumi-browser は Vue.js 2 と Electron でコーディングされた軽量なブラウザです。
- [**Space-Snake**](https://github.com/ilyagru/Space-Snake): Electron と Vue.js で作られたデスクトップゲーム。
- [**Forrest**](https://github.com/stefanjudis/forrest): npm scripts デスクトップクライアント
- [**miikun**](https://github.com/hiro0218/miikun): シンプルなマークダウンエディター
- [**Dakika**](https://github.com/Madawar/Dakika): 議事録を簡単に取ることができるアプリケーション
- [**Dynamoc**](https://github.com/ieiayaobb/dynamoc): Dynamoc は dynamodb-local、 dynalite と AWS dynamodb のための GUI クライアントです
- [**Dockeron**](https://github.com/dockeron/dockeron): Docker のために Electron と Vue.js で作られた dockeron プロジェクト
- [**Easysubs**](https://github.com/matiastucci/easysubs): 字幕を早く簡単な方法でダウンロードする
- [**Data-curator**](https://github.com/ODIQueensland/data-curator):利用可能な公開データを共有します。


================================================
FILE: docs/ja/SUMMARY.md
================================================
# 概要

- [導入](./README.md)
- [はじめに](getting_started.md)
- [プロジェクト構造](project_structure.md)
    - [ファイルツリー](file-tree.md)
    - [レンダラープロセス](renderer-process.md)
    - [メインプロセス](main-process.md)
    - [Webpack 構成](webpack-configurations.md)
- [開発](development.md)
    - [index.html](entry_indexhtml.md)
    - [Vue プラグイン](vue_accessories.md)
    - [NPM スクリプト](npm_scripts.md)
    - [CSS フレームワークの使用](using_css_frameworks.md)
    - [プリプロセッサの使用](using_pre-processors.md)
    - [静的アセットの使用](using-static-assets.md)
    - [ローカルファイルの読み書き](savingreading-local-files.md)
- [アプリケーション構築](building_your_app.md)
    - [electron-packager の使用](using-electron-packager.md)
    - [electron-builder の使用](using-electron-builder.md)
- [テスト](testing.md)
    - [ユニットテスト](unittesting.md)
    - [エンドツーエンドテスト](end-to-end_testing.md)
- [メタ](meta.md)
    - [FAQ](faqs.md)
    - [新しいリリース](new-releases.md)
    - [マイグレーションガイド](migration-guide.md)
    - [貢献](contributing.md)


================================================
FILE: docs/ja/book.json
================================================
{
  "root": ""
}


================================================
FILE: docs/ja/building_your_app.md
================================================
# アプリケーション構築

electron-vue はビルドと本番アプリケーションの配布のために [electron-packager](https://github.com/electron-userland/electron-packager) と [electron-builder](https://github.com/electron-userland/electron-builder) の両方をサポートしています。両方のビルドツールは素晴らしい [@electron-userland](https://github.com/electron-userland) コミュニティによって支援されていて、それぞれに詳細なドキュメントがあります。`vue-cli` のスキャフォールディング中にどちらのビルダーを使いたいか尋ねられます。

## [`electron-packager`](using-electron-packager.md)

electron アプリケーションを作成するのが初めて使う人や単純な実行可能ファイルを作成する必要がある場合、`electron-packager` がニーズに最適です。

## [`electron-builder`](using-electron-builder.md)

完全なインストーラー、自動更新サポート、Travis CI と AppVeyor を使用した CI ビルド、またはネイティブコードモジュールの再構築の自動化を探し求めている場合、`electron-builder` が最適です。


================================================
FILE: docs/ja/contributing.md
================================================
# 貢献

このボイラープレートを手助けしたいですか?遠慮なくプルリクエストを送信してください。何かを送信する準備をする前に、以下をチェックしてください...

### JavaScript 標準スタイル

全ての JS が***標準スタイル***に従っていることを確実にするために、これらの[ルール](http://standardjs.com/#rules)に従っていることを確認してください。

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)


================================================
FILE: docs/ja/development.md
================================================
# 開発

### 開発セットアップ

`yarn` または `npm install` で依存関係をインストールした後、実行します...

```bash
yarn run dev # or npm run dev
```

...そしてやりました!electron-vue アプリケーションの実行に成功しました。
![](../images/landing-page.jpg)

このボイラープレートには、簡単に取り外し可能なランディングページがいくつか付属しています。


================================================
FILE: docs/ja/end-to-end_testing.md
================================================
# エンドツーエンドテスト

electron-vue はエンドツーエンドテストのために [Spectron](http://electron.atom.io/spectron/) とテストフレームワークの [Mocha](https://mochajs.org/) ([Chai](http://chaijs.com/) と一緒に) を利用しています。Mocha と Chai の APIは、`expect`、`should`、`assert`を含め、グローバルスコープで利用可能です。

### テストの実行

```bash
# Mocha を始める
npm run e2e
```

##### 注意

エンドツーエンドテストを実行する前に、Spectron がテスト中に使用する本番ビルドを作成するために、`npm run pack` が呼び出されます。

### ファイル構造

```
my-project
├─ test
|  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ utils.js
```

**ほとんどの場合、 **`index.js`** は無視して、 **`specs/`** を書くことだけに集中できます。**

#### `specs/`

このディレクトリの中に実際のテストが書かれています。`babel-register` の機能のおかげで、ES2015にフルアクセスできます。

#### `index.js`

このファイルは Mocha のメインエントリーとして機能し、テスト用に `specs/` で書かれた全てのテストを集めます。

#### `utils.js`

ここでは、`specs/` 全体で使用することができる汎用関数を見つけることができます。基本関数には、 electron の作成/破壊プロセスを処理する `beforeEach` と `afterEach` が含まれます。

### Spectron について

Spectron は 公式の [electron](http://electron.atom.io) テストフレームワークであり、DOM 要素を操作するために [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) と [WebDriverIO](http://webdriver.io/) の両方を使用します。

#### WebDriverIO の使用

Spectron の[ドキュメント](https://github.com/electron/spectron#client)に記載されている通り、[WebDriverIO API](http://webdriver.io/api.html) へのアクセスは `this.app.client` を通してすることができます。 electron-vue は Mocha を使用しているため、`this` のコンテキストは `afterEach`、`beforeEach`、`it` の間で共有されます。このため、ES2015 のアロー関数は、`this` のコンテキストが上書きされるため、特定の状況では使用できないことに注意することが重要です([詳細はこちら](https://mochajs.org/#arrow-functions))。


================================================
FILE: docs/ja/entry_indexhtml.md
================================================
#  `index.html`

electron-vue は本番ビルドで `index.html` を作成するために [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-plugin) を使用します。開発中は `src/` ディレクトリの`index.ejs` となります。ここではエントリーとなる HTML ファイルを変更することができます。

このプラグインがどのように動作するかわからない場合は、その[ドキュメント](https://www.npmjs.com/package/html-webpack-plugin)を見ることを勧めます。しかし要するに、このプラグインは自動的に `renderer.js` と `styles.css`  を含む本番アセットを最終的にファイルサイズを小さくし、 `index.html` に挿入します。

### 開発中の `index.ejs`

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <%= ... %>
  </head>
  <body>
    <div id="app"></div>
    <!-- webpack ビルドが自動的に注入されます -->
  </body>
</html>
```

### 本番の(ファイルサイズを小さくしていない) `index.html`

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>app</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div id="app"></div>
    <script type="text/javascript" src="renderer.js"></script>
  </body>
</html>
```

### CDN の利用について

CDN から提供されるアセットを利用することは、アプリケーションの最終的なビルドサイズにとっては素晴らしい利点があるかもしれませんが、それらを使用することは勧めません。主な理由は、そうすることによってアプリケーションが必ずインターネットにアクセスできると仮定することになりますが、Electron アプリケーションの場合は必ずしもそうとは限りません。これは bootstrap のような CSS フレームワークではかなり重大な問題となり、アプリケーションはすぐに整っていない状態になるでしょう。

> "私は気にしません、それでも CDN を使いたいです"

それでも CDN を利用すると決めた場合は、 `src/index.ejs` ファイルにタグを追加することでできます。ただアプリケーションがオフラインの時の UI/UX フローを適切に設定してください。


================================================
FILE: docs/ja/faqs.md
================================================
# FAQ

- [`npm run dev` を実行した後に electron アプリケーションが空白になるのはなぜですか?](#why-is-my-electron-app-blank-after-running-npm-run-dev)
- [electron アプリケーションがファイルエクスプローラーを表示するのはなぜですか?](#why-does-my-electron-app-show-a-file-explorer)
- [`vue-devtools`/`devtron` が見つからないと言われるのはなぜですか?](#why-is-vue-devtoolsdevtron-missing)
- [静的なアセットはどこに置けば良いですか?](#where-do-i-put-static-assets)
- [`npm run lint` がエラーで終了するのはなぜですか?](#why-did-npm-run-lint-end-with-an-error)
- [アプリケーションが web ブラウザで読み込めないのはなぜですか?](#why-cant-i-load-my-app-in-a-web-browser)
- [`jquery` はどうやってインポートするのですか?](#how-do-import-jquery)
- [`main` プロセスはどうやってデバッグするのですか?](#how-can-i-debug-the-main-process)

---

## `npm run dev` を実行した後に electron アプリケーションが空白になるのはなぜですか?

#### 要約

`webpack-dev-server` を改ざんする個人用の**プロキシ**がないことを確認してください。

## electron アプリケーションがファイルエクスプローラーを表示するのはなぜですか?

#### 要約

`src/renderer` にエラーがあります。コンソールを確認し、エラーを修正し、`CommandOrControl+R` で electron を更新してください。

##### 詳細

`src/renderer` にエラーがある場合、最初の実行時に ESLint と競合が発生します。次に、無効な webpack の `renderer.js` が作成され、`HtmlWebpackPlugin` が `index.html` を作成するのを中断します。`webpack-dev-server` は提供可能な `index.html`  がないので、サーバーはファイルエクスプローラーを表示します。

## `vue-devtools`/`devtron` が見つからないと言われるのはなぜですか?

初めて起動するときに、開発者ツールのパネルがないときは閉じて再度開いてください。また、インストール中にエラーメッセージが発生していないか、ターミナルを確認してください。

## 静的なアセットはどこに置けば良いですか?

[**静的なアセットの使用**](using-static-assets.md)

## `npm run lint` がエラーで終了するのはなぜですか?

ESLint のデフォルトの性質は、リントエラーをコンソールに表示することです。もし何か見つかった場合は、スクリプトは0でない値を返し終了します(これが npm エラーを作成します)。これは正常な動作です。

## アプリケーションが web ブラウザで読み込めないのはなぜですか?

[#195](https://github.com/SimulatedGREG/electron-vue/issues/195)

## `jquery` はどうやってインポートするのですか?

`bootstrap` を使いたい場合、あなたを止めなければなりません。`vue` と `jquery` の両方を同じ環境で使用することはバッドプラクティスであり、2つのフレームワークが互いに衝突することにつながります。`vue` を JavaScript 関数的に使用する `bootstrap` の代替を使用することを強くお勧めします。お勧めは、[`bootstrap-vue`](https://github.com/bootstrap-vue/bootstrap-vue) と [`vue-strap`](https://github.com/yuche/vue-strap) です。何らかの理由で `jquery` を使用しなければならない場合、`webpack`の `ProvidePlugin` に関するドキュメントを詳しく調べるか [#192](https://github.com/SimulatedGREG/electron-vue/issues/192) を参照してください。

## `main` プロセスはどうやってデバッグするのですか?

`electron@^1.7.2` 以上を使用している場合、Google Chrome を開き、`chrome://inspect` にアクセスし、アプリケーションが開発モードで起動している間に、リモート electron プロセスを開くことができます。

[Electron のドキュメント](https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md)


================================================
FILE: docs/ja/file-tree.md
================================================
# ファイルツリー

### 開発中

**注**: 一部のファイル/フォルダは `vue-cli` スキャフォールディングで選択した設定に応じて異なる場合があります。

```
my-project
├─ .electron-vue
│  └─ <build/development>.js files
├─ build
│  └─ icons/
├─ dist
│  ├─ electron/
│  └─ web/
├─ node_modules/
├─ src
│  ├─ main
│  │  ├─ index.dev.js
│  │  └─ index.js
│  ├─ renderer
│  │  ├─ components/
│  │  ├─ router/
│  │  ├─ store/
│  │  ├─ App.vue
│  │  └─ main.js
│  └─ index.ejs
├─ static/
├─ test
│  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ utils.js
│  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ karma.config.js
│  └─ .eslintrc
├─ .babelrc
├─ .eslintignore
├─ .eslintrc.js
├─ .gitignore
├─ package.json
└─ README.md
```

#### 本番ビルド

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```

おそらくお分かりの通り、ほとんどすべてが最終的な本番ビルドでは取り除かれます。electron アプリケーションを配布する際は、大きいファイルサイズのソフトウェアをユーザーにダウンロードさせたくないので、これはほとんど必須です。


================================================
FILE: docs/ja/getting_started.md
================================================
# はじめに

## スキャフォールディング

このボイラープレートは [vue-cli](https://github.com/vuejs/vue-cli) のテンプレートとして作成され、スキャフォールディングされたアプリケーションをカスタマイズするためのオプションが含まれています。`node@^7` かそれ以上のバージョンを使用する必要があります。 electron-vue はパッケージマネージャの [`yarn`](https://yarnpkg.org) を公式に推奨しています。 依存関係をよりよく処理し、`yarn clean` により最終的なビルドサイズを減らすことができます。

```bash
# vue-cli をインストールしボイラープレートをスキャフォールディングします
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project
# 依存関係をインストールし、アプリケーションを実行します
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

#### electron について

オプションとはいっても、プロジェクトをスキャフォールディングした後は electron のバージョンを固定することをお勧めします。これは、同じプロジェクトで作業している開発者が異なるバージョンで開発することを防ぐことに役立ちます。electron はリリースを頻繁に行うため、機能は常に変更対象となります。 [詳細な情報はこちら](http://electron.atom.io/docs/tutorial/electron-versioning/)。

#### Windows ユーザーのための注意

`npm install` 中に `node-gyp` に関するエラーが発生した場合、システムに適切なビルドツールがインストールされていない可能性が非常に高いです。ビルドツールには、Python や Visual Studio などのアイテムが含まれています。[@felixrieseberg](https://github.com/felixrieseberg) のおかげで、このプロセスを簡潔にするのに役立つパッケージがいくつかあります。

最初に確認する項目は npm のバージョンで、古いバージョンでないことを確認します。これは [`npm-windows-upgrade`](https://github.com/felixrieseberg/npm-windows-upgrade) を使用することで達成できます。`yarn` を使用する場合は、この確認をスキップすることができます。

それが完了したら、引き続きビルドツールをセットアップします。[`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools) を使用することで、めんどくさいことの大半は完了します。これをグローバルにインストールすると Visual C ++パッケージ、 Python などがセットアップされます。

この時点では正常にインストールされるはずですが、そうでない場合は Visual Studio をクリーンインストールする必要があります。これらは electron-vue 自身の問題ではないことに注意してください(Windows は時々面倒になることがあります ¯\\\_\(ツ\)\_/¯\)。


================================================
FILE: docs/ja/global_configuration.md
================================================
# Global Configuration

electron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre-processing, bundling, and building your app. The default settings are rather common and should meet most of your needs. An additional `config.js` is provided in the root directory for quick adjustments. Further customization can be made by directly adjusting `webpack.main.config.js` and `webpack.renderer.config.js`.

#### `config.js`

**Note**: Some options may differ based on the settings choosen during `vue-cli` scaffolding.

```js
{
  // Name of electron app
  // Will be used in production builds
  name: 'app',
  // Use ESLint
  // Further changes can be made in `.eslintrc.js`
  eslint: true,
  // webpack-dev-server port
  port: 9080,
  // electron-packager options
  // See `Building you app` for more info
  building: {
    arch: 'x64',
    asar: true,
    dir: path.join(__dirname, 'app'),
    icon: path.join(__dirname, 'app/icons/icon'),
    ignore: /\b(src|index\.ejs|icons)\b/,
    name: pkg.name,
    out: path.join(__dirname, 'builds'),
    overwrite: true,
    platform: process.env.PLATFORM_TARGET || 'all'
  }
}
```


================================================
FILE: docs/ja/main-process.md
================================================
# メインプロセス

> Electron では、package.json のメインスクリプトを実行するプロセスをメインプロセスと呼びます。メインプロセスで実行されるスクリプトは、Web ページを作成して GUI を表示できます。

[**Electron ドキュメンテーション**](http://electron.atom.io/docs/tutorial/quick-start/#main-process)**より **

---

`main` プロセスは根本的に完全な Node 環境なので、2つのファイル以外の初期プロジェクト構造は存在しません。

#### `src/main/index.js`

このファイルはアプリケーションのメインファイルであり、 `electron` が起動するファイルです。本番向けの `webpack` のエントリーファイルとしても使われます。すべての `main` プロセスの作業はここから開始しなければなりません。

#### `app/src/main/index.dev.js`

このファイルは開発時にのみ `electron-debug` と `vue-devtools`をインストールするために使われます。このファイルを修正する必要はありませんが、開発の必要に応じて拡張することもできます。

## `__dirname` と `__filename` の使用について

`main` プロセスは `webpack` を使用してバンドルされているため、`__dirname` と `__filename` を使用しても本番環境で期待した値は得られ **ないでしょう**。[**ファイルツリー**](/file-tree.md) を参照すると、本番環境では `main.js` が `dist/electron` フォルダの中に置かれていることがわかるでしょう。この知識に基づいて、`__dirname` と `__filename` を適切に使用してください。

**`static/` アセットディレクトリへのパスが必要な場合は、**[**静的なアセットの使用**](/using-static-assets.md)** を参照して、とても便利な `__static` 変数について学んでください。**

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```


================================================
FILE: docs/ja/meta.md
================================================
# メタ

### ありがとうございます

わあ、electron-vue を GitHub で(見つけることができる)トップ3の `vue-cli` テンプレートのうちの1つにするのを手伝ってくれてありがとうございます。このプロジェクトが今のようになるとは思っても見ませんでした。振り返ると、もともとこのボイラープレートは(**2016年5月**に)個人用のクローズドソースとして作成し、大部分が再利用可能になっていることを知ったときに(ボイラープレート自身を)オープンソースにすることを決めました。今では、新しい機能が数多く導入され、コミュニティからの驚くべきサポートがあります。 私が答えられないときに問題に答えてくれるコミュニティの人々に格別の感謝を表明したいです。 皆さんは何かをする絶対的な義務はありませんが、してくれます。私はそれに感謝しています。

これを読んでいるなら、本当に electron-vue を楽しんでくれているはずだと思います。このボイラープレートを作成するのに多くの時間が費やされました。あなたが気前が良くて、望むならば、遠慮なくチップを残してください。確かに electron-vue の将来の開発は寄付に依存しませんが、それを使用することに決めるならば、常にオプションとなります。

#### [**PayPal.me**](https://www.paypal.me/simulatedgreg/5)


================================================
FILE: docs/ja/migration-guide.md
================================================
# 移行ガイド

以下のドキュメントでは、プロジェクトが移行をどのように達成*すべき*であるか説明しますが、プロジェクト全体の構造が常に変更されているため、完全な方法ではない可能性があります。

1. `vue init simulatedgreg/electron-vue my-project` を行い、electron-vue の新しいバージョンをスキャフォールドする
2. 現在のプロジェクトの `src` ファイルを新しくスキャフォールディングした `src` ディレクトリにコピーする
3. `package.json` の依存関係を現在のプロジェクトから新しくスキャフォールディングした `package.json` にコピーする
4. `yarn` もしくは `npm install` で依存関係をインストールする
5. 開発モードでプロジェクトを実行する(`yarn run dev` もしくは `npm run dev`)
6. コンソールで修正するエラーを監視する

上で言及したように、新しいスキャフォールドに移行する完全な方法はありませんが、一般的でほぼ完全に進めるための主要なステップになります。 プロジェクトの構造やアセットの取り扱いに関する個人的な変更は、あなたまたはチームが移行することになります。`master` ブランチの electron-vue の現在のバージョンを常に反映するので、残りのドキュメントを必ずチェックしてください。


================================================
FILE: docs/ja/miscellaneous.md
================================================


================================================
FILE: docs/ja/new-releases.md
================================================
# 新しいリリース

electron-vue は2016年5月に作成して以来、大きく進化し、多くの新しく素晴らしい機能を導入してきました。`vue-cli` のスキャフォールディングが提供されていない時があったことを信じられますか?新しい機能の開発はすぐに終了するつもりはありません。新しいオプション機能の唯一の欠点は、あなたのプロジェクトが古いスキャフォールディングから離れられないでいることです。electron-vue は `vue-cli` を使用しているため、残念ながら、ボイラープレートを*バージョンアップ* したり、*更新可能*にする構造化の方法はありません。

electron-vue のメジャーアップデートは GitHub マイルストーンを介して行われ、一度に多くの新しい機能/バグ修正を含み、これらのリリースは既存のプロジェクトを新しくスキャフォールディングし、[移行](/migration-guide.md)するのに最適な時です。これらのマイルストーンは通常は計画されていませんが、機能要求が課題トラッカーに追加されると発生します。

### 過去のマイルストーン

#### [複合化](https://github.com/SimulatedGREG/electron-vue/milestone/1?closed=1)

- `webpack` 2 への移行
- `electron-builder` のサポート
- `main` プロセスバンドルのサポート
- 全体的なバグ修正

#### [最小化](https://github.com/SimulatedGREG/electron-vue/issues/171)

- 単一の `package.json` 構造への移行
- `electron-builder` ユーザー向けの Travis CI / AppVeyor 構成
- `renderer` プロセスの最小 web 出力
- `axios` への移行
- `main` プロセスバンドルの完全サポート
- 開発とビルドスクプリトの書き直し
- ES5 へのトランスパイルの必要を取り除く `babili` への移行
- フルパスを必要とするモジュールを使用する際の `static/` アセットをサポート ([`__static`](/using-static-assets.md))


================================================
FILE: docs/ja/npm_scripts.md
================================================
# NPM スクリプト

開発プロセスに関する冗長なタスクを排除するために、役立つ NPM スクリプトに注目してください。次のコマンドは、プロジェクトのルートディレクトリから実行する必要があります。そしてもちろん、以下のコマンドのどれでも `yarn run <command>` を使用して実行することが可能です。

### `npm run build`

本番用にアプリケーションをビルドし、パッケージングします。詳細は [**アプリケーションのビルド**](building_your_app.md) セクションを参照してください。

### `npm run dev`

開発用にアプリケーションを実行します。

### `npm run lint`

全ての `src/` と `test/` の JS と Vue コンポーネントファイルをリントします。

### `npm run lint:fix`

全ての `src/` と `test/` の JS と Vue コンポーネントファイルをリントし、問題を解決しようとします。

### `npm run pack`

`npm run pack:main` と `npm run pack:renderer` の両方を実行します。これらのコマンドは利用可能ですが、`npm run build` がこのステップを処理するため、手動で実行する場面はそれほど多くありません。

### `npm run pack:main`

`main` プロセスのソースコードをビルドするために webpack を実行します。

### `npm run pack:renderer`

`renderer` プロセスのソースコードをビルドするために webpack を実行します。

### `npm run unit`

Karma と Jasmine でユニットテストを実行します。詳細は[**ユニットテスト**](unittesting.md)を参照してください。

### `npm run e2e`

Spectron と Mocha でE2Eテストを実行します。詳細は[**E2Eテスト**](end-to-end_testing.md)を参照してください。

### `npm test`

`npm run unit` と `npm run e2e` の両方を実行します。詳細は[**テスト**](testing.md)を参照してください。


================================================
FILE: docs/ja/project_structure.md
================================================
# プロジェクト構造

electron アプリケーションの作成に関しては、プロジェクト構造は少し変わっています。これまで公式の [`vuejs-templates/webpack`](https://github.com/vuejs-templates/webpack) セットアップを使用していたのならば、構造はかなり似通っていると感じるでしょう。このセクションのドキュメントではどのようにボイラープレートが動作するかの概要とアプリケーションをビルドする際の違いを説明しようと思います。

### 単一の `package.json` によるセットアップ

そんなに前のことではありませんが、2つの `package.json` によるセットアップが必要でした。しかし、 [@electron-userland](https://github.com/electron-userland) の努力のおかげで、 [`electron-packager`](https://github.com/electron-userland/electron-packager) と [`electron-builder`](https://github.com/electron-userland/electron-builder)  の両方が完全に単一の `package.json` によるセットアップをサポートしています。

#### `dependencies`

これらの依存関係は最終的な本番アプリケーションに含まれ**ます**。つまり、アプリケーションが動作するのに必要なモジュールがある場合は、ここにインストールしてください!

#### `devDependencies`

これらの依存関係は最終的な本番アプリケーションに含まれ**ません**。ビルドスクリプトや`webpack` ローダーなどの開発に必要な特定のモジュールをインストールします。

#### ネイティブ NPM モジュールのインストール

ネイティブ npm モジュールが electron に対してビルドされていることを確認する必要があります。それをするためには、 [`electron-rebuild`](https://github.com/electron/electron-rebuild) を使用できます。しかし、単純化のため、これらのタスクをうまく処理するビルドツールに [`electron-builder`](https://github.com/electron-userland/electron-builder)  を使用することを強くお勧めします。

### `main` プロセスについて

開発中に `src/main/index.dev.js` に気付くかもしれません。このファイルは特に開発のために使用され、開発ツールのインストールにも使用されます。このファイルを変更する必要はありませんが、開発の必要に応じて拡張するために使用することができます。ビルド時、`webpack` は `src/main/index.js` 自身をエントリーファイルとしてバンドルを作成します。


================================================
FILE: docs/ja/renderer-process.md
================================================
# レンダラープロセス

> Electron は web ページの表示に Chromium を使用するので、 Chromium の マルチプロセスアーキテクチャも使われています。Electron では web ページごとにレンダラープロセスと呼ばれる独自のプロセスが実行されます。普通のブラウザでは、webページは通常サンドボックス環境で実行され、ネイティブリソースへのアクセスは許可されません。 しかし、 electron ユーザーは、 web ページで Node.js API を使用して、より低レベルのオペレーティングシステムとのやりとりを可能にしています。

[**Electron ドキュメンテーション**](http://electron.atom.io/docs/tutorial/quick-start/#renderer-process)**より **

---

## `vue` と `vuex` について

### vue コンポーネント

Vue コンポーネントに精通していない場合は、[こちら](https://jp.vuejs.org/v2/guide/single-file-components.html)を読んでください。 コンポーネントを使用することで、巨大で複雑なアプリケーションをより構造化することができます。各コンポーネントは CSS やテンプレートや JavaScript の関数をカプセル化することができます。

コンポーネントは `src/renderer/components` に格納されます。子コンポーネントを作成するときは、親コンポーネントの名前を持つ新しいフォルダ内に子コンポーネントを配置するのが一般的な方法です。これは、異なるルートをまとめる場合に特に便利です。

```
src/renderer/components
├─ ParentComponentA
│  ├─ ChildComponentA.vue
│  └─ ChildComponentB.vue
└─ ParentComponentA.vue
```

### vue ルーティング

`vue-router` の詳細については [こちら](https://github.com/vuejs/vue-router) をクリックしてください。手短に言うと、 electron アプリケーションを作成するときにシングルページアプリケーションを作成することはとても適しているので、 `vue-router` を使用することをお勧めします。たくさんのブラウザウィンドウを管理し、すべての間で情報をやりとりしたいですか?おそらくそうではないですよね。

ルーティングは `src/renderer/router/index.js` の中に保持され、このように定義されます...

```js
{
  path: '<routePath>',
  name: '<routeName>',
  component: require('@/components/<routeName>View')
}
```

`<routepath></routepath>` と ` <routename><routename>` はどちらも変数です。これらのルーティングは `src/renderer/App.vue` の `<router-view></router-view>` ディレクティブを使用してコンポーネントツリーにアタッチされます。

##### 注意

`vue-router` を使用するときは、 [**HTML5 ヒストリーモード**](http://router.vuejs.org/ja/essentials/history-mode.html)を使用しないでください。このモードは厳密には `http`  プロトコルを介してファイルを提供するためのもので、 electron がプロダクションビルドでファイルを提供する `file` プロトコルでは正しく動作しません。デフォルトの `hash` モードがまさに求めているものです。

### vuex モジュール

`vuex` を説明するのは簡単なことではないので、どんな問題を解決しようとしているか、どのように動作するのかをより理解するために [こちら](http://vuex.vuejs.org/ja/intro.html) を読んでください。

electron-vue `vuex` のモジュール構造を利用して複数のデータストアを作成し、`src/renderer/store/modules` に保存します。

複数のデータストアを持つことは構造的には素晴らしいですが、それぞれをインポートする必要があります。しかし、`src/renderer/store/modules/index.js` が嫌がる仕事をするので、気にしないでください!この小さなスクリプトは  `src/renderer/store/index.js` のすべてのモジュールをワンショットでインポートします。以降は、`Counter.js` モジュールを簡単に複製できることだけ知っていれば、それは "魔法のように" 読み込まれます。


================================================
FILE: docs/ja/savingreading-local-files.md
================================================
# ローカルファイルの読み書き

`electron` を使用する利点の一つは、ユーザーのファイルシステムにアクセスできることです。これにより、ローカルシステム上のファイルを読み書きすることができます。Chromium の制限を回避し、アプリケーションの内部ファイルに書き込むには、`electron` の API 、特に [`app.getPath(name)`](https://electron.atom.io/docs/api/app/#appgetpathname) 関数を使用してください。このヘルパーメソッドは、ユーザーのデスクトップ、システムの一時ファイルなどのシステムディレクトリへのファイルパスを取得できます。

### ユースケース

アプリケーション用のローカルデータベースストアを用意したいとしましょう。この例では、[`nedb`](https://github.com/louischatriot/nedb) を使って説明します。

```bash
yarn add nedb # or npm install nedb --save
```

**src/renderer/datastore.js**

ここでは NeDB を設定し、パスを `userData` ディレクトリに向けます。このファイルスペースは、アプリケーション専用に確保されているため、他のプログラムや他のユーザーのやりとりがこのファイルスペースを改ざんしないだろうという確信を得ることができます。ここから、 `renderer` プロセスで `datastore.js` をインポートし、使うことができます。

```js
import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'
export default new Datastore({
  autoload: true,
  filename: path.join(remote.app.getPath('userData'), '/data.db')
})
```

**src/renderer/main.js**

さらに手順を進めると、データストアを `src/renderer/main.js` にインポートし、 Vue のプロトタイプに設定することができます。そうすることで、全てのコンポーネントファイルで `this.$db` を通してデータストア API にアクセスすることができるようになりました。

```js
import db from './datastore'
/* 他のコード */
Vue.prototype.$db = db
```


================================================
FILE: docs/ja/testing.md
================================================
# テスト

electron-vue は `renderer` プロセスのユニットテストとエンドツーエンドテストの両方をサポートし、公式の `vuejs-templates/webpack` ボイラープレートで提供されているテスト設定に大きく影響を受けています。`vue-cli`  スキャフォールディング中にテストサポートを含めるかの選択があります。

## [ユニットテスト](unittesting.md)

Karma と Mocha でユニットテストを実行する

```bash
npm run unit
```

## [エンドツーエンドテスト](end-to-end_testing.md)

Spectron と Mocha でエンドツーエンドテストを実行する

```bash
npm run e2e
```

## 全てのテストを実行する

```bash
npm test
```

### CI テストについて

スキャフォールディング時にビルドツールとして `electron-builder` を使うことに決めた場合、`darwin`、`linux`、`win32`向けにTravis CI と AppVeyorの両方で簡単にアプリケーションをテストできます。`.travis.yml` と `appveyor.yml` の中には、コメントアウトされたセクションがあります。テストを有効にするために、セクションのコメントアウトを解除することができます。詳細については、[**CI を使用した自動デプロイ**](using-electron-builder.md#automated-deployments-using-ci)を読んでください。** **


================================================
FILE: docs/ja/unittesting.md
================================================
# ユニットテスト

electron-vue はユニットテストのためにテストランナーの [Karma](https://karma-runner.github.io/1.0/index.html) とテストフレームワークの [Mocha](https://mochajs.org/) ([Chai](http://chaijs.com/) と一緒に) を利用しています。

Mocha と Chai はそれぞれ `karma-mocha` と `karma-chai`  を使用して統合されているため、`expect` などの全ての API はテストファイルで全て使用可能です。

### テストの実行

```bash
# Karma を始める
npm run unit
```

### ファイル構造

```
my-project
├─ test
|  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ karma.conf.js
```

**ほとんどの場合、**`index.js`** と **`karma.conf.js`** は無視して **`specs/`** を書くことだけに集中できます。**

#### `specs/`

このディレクトリの中に実際のテストが書かれています。webpackのおかげで、ES2015とサポートされているローダーにフルアクセスできます。

#### `index.js`

これは `karma-webpack` で使われるエントリーファイルです。このファイルの目的は、全てのテストとソースコードをワンショットで集めることです。

#### `karma.conf.js`

ここでは、スペック/カバレッジレポーターで設定された実際の `karma` 構成を見つけることができます。さらなるカスタマイズは[公式の karma のドキュメント](http://karma-runner.github.io/1.0/config/configuration-file.html)に従って行うことができます。

### 依存関係のモック化

electron-vue にはデフォルトでインストールされた [`inject-loader`](https://github.com/plasticine/inject-loader) が付属しています。Vue コンポーネントファイルでの使用については、[`vue-loader` のドキュメントのモックを使用したテスト](http://vue-loader.vuejs.org/ja/workflow/testing-with-mocks.html)を参照してください。


================================================
FILE: docs/ja/using-electron-builder.md
================================================
# [`electron-builder`](https://github.com/electron-userland/electron-builder)の使用 

`electron-builder` によって作成された全てのビルドは `build` ディレクトリ内にあります。

#### ビルド

```bash
npm run build
```

#### 解凍されたディレクトリのビルド

フルインストーラなしで簡単な実行可能ファイルを作成します。迅速なテストに役立ちます。

```bash
npm run build:dir
```

### デフォルトのビルド構成

[こちら](https://github.com/electron-userland/electron-builder/wiki/Options)にある `electron-builders` のオプションに従って、`package.json` でさらにカスタマイズすることができます。

```js
"build": {
  "productName": "ElectronVue",
  "appId": "org.simulatedgreg.electron-vue",
  "dmg": {
    "contents": [
      {
        "x": 410,
        "y": 150,
        "type": "link",
        "path": "/Applications"
      },
      {
        "x": 130,
        "y": 150,
        "type": "file"
      }
    ]
  },
  "directories": {
    "output": "build"
  },
  "files": [
    "dist/electron",
    "node_modules/",
    "package.json"
  ],
  "mac": {
    "icon": "build/icons/icon.icns"
  },
  "win": {
    "icon": "build/icons/icon.ico"
  },
  "linux": {
    "icon": "build/icons"
  }
}
```

## CI を使用した自動デプロイ

electron-vue の `electron-builder` 構成を使用する場合、自動デプロイのために `appveyor.yml` と `.travis.yml` も提供されます。両方の設定ファイルは electron アプリケーションのビルドや GitHub リリース、 Bintray などへ生成物をプッシュするために設定されています。Travis CI は `linux` と `darwin` (macOS) の両方のビルドに使用される一方、AppVeyor は `win32` のビルドに使用されます。どちらのサービスも OSS プロジェクトに対しては無料です。

#### Travis CI/AppVeyor のセットアップ

1. [Travis CI](https://travis-ci.org/getting_started) / [AppVeyor](https://www.appveyor.com/) でアカウントを作成します
2. electron-vue プロジェクトがある GitHub リポジトリにリンクします
3. [https://github.com/settings/tokens](https://github.com/settings/tokens) にアクセスし、**Generate new token ** を押します(Travis CI と AppVeyor 両方で同じトークンが使用可能です)
    1. **Token description** を設定します
    2. **public_repo ** スコープにチェックをつけます
    3. **Generate token** を押します
4. 新しいトークンをコピーして後々使うために保存します
5. Travis CI / AppVeyor でリポジトリ設定を開き、新しい**環境変数**を追加します
    1. 変数の名前を `GH_TOKEN` に設定します
    2. 変数の値を作成したばかりのGitHubアクセストークンに設定します
    3. 新しい変数を**保存**し、暗号化が有効になっていることを確認します

この時点で、全てがセットアップされました。Travis CI/AppVeyor はデフォルトで `master` ブランチへのプッシュを監視します。プッシュが行われると、Travis CI/AppVeyor はリポジトリをサーバーにクローンし、ビルドプロセスを開始します。最終ステージでは、`electron-builder`  は環境変数の `GH_TOKEN` を見て、ドラフトのリリースを作成し、作成物を GitHub のパブリックリポジトリにアップロードします。この時点から、ドラフトのリリースを編集して、それを世界に公開することができます。 リリースを公開した後、`package.json` を更新して、将来のリリースに新しいバージョン番号が付いていることを確認してください。

#### 自動アップデート

アプリケーションが自動アップデートを受信できるようにすることは、優れた機能ですが、[**コードサイニング**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing)が必要であることを知ってください。[こちら](https://github.com/electron-userland/electron-builder/wiki/Code-Signing)で説明されている  `electron-builder` が必要とするものに基づいて、いくつかの環境変数を追加することでコードサイニングを設定可能です。いったん証明書を設定すると、 `electron-updater`  をインストールし、自動アップデートを有効にするために、`src/main/index.js` の一番下のコードをコメントアウトすることができます。

ほとんどの人と同じように、コード署名証明書がない場合は、GitHub API を使用して新しいリリースをチェックすることができます。新しいリリースが検出されたら、アプリケーション内で、新しいビルドをダウンロードしてインストールできるダウンロードページをユーザーに示す通知を提供します。`electron-builder` が提供する素晴らしいインストーラーのおかげで、ユーザーは現在のバージョンをアンインストールする必要がなくなり、新しいインストールは Web ストレージまたは `userData` ファイルをそのまま維持しながら古いものを置き換えます。


================================================
FILE: docs/ja/using-electron-packager.md
================================================
# [`electron-packager`](https://github.com/electron-userland/electron-packager) の使用

`electron-packager` によって作成された全てのビルドは `build` フォルダ内にあります。

#### 全てのプラットフォーム用にビルド

すべてのオペレーティングシステムが他のすべてのプラットフォーム用に構築できるとは限りません。

```bash
npm run build
```

#### 特定のプラットフォーム用のビルド

プラットフォームには `darwin`、 `mas`、 `linux` と `win32` があります。

```bash
# darwin 用にビルドする(macOS)
npm run build:darwin
```

#### クリーニング

`build` から全てのビルドを削除します。

```bash
npm run build:clean
```

### Windows以外のユーザーのためのメモ

Windows 以外のプラットフォームを使用して**カスタムアイコン付きで** Windows 用にビルドしたい場合、[wine](https://www.winehq.org/) をインストールする必要があります。[詳細な情報はこちら](https://github.com/electron-userland/electron-packager#building-windows-apps-from-non-windows-platforms)。

### デフォルトのビルド構成

[こちら](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options) に記載のある `electron-packager` のオプションの通りに `.electron-vue/build.config.js` でさらなるカスタマイズが可能です。ビルドされたアプリケーションに適用される名前は `package.json` の `productName` の値が設定されます。

```js
{
    // 'x64' アーキテクチャを対象にします
    arch: 'x64',
    // 'electron/asar' を使用してアプリケーションを圧縮します
    asar: true,
    // アプリケーションのディレクトリ
    dir: path.join(__dirname, '../'),
    // electron のアプリケーションアイコンを設定します
    // ファイル拡張子はプラットフォームに基づいて追加されます
    //
    // Linux 用にビルドする場合、以下を参照してください
    // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon
    icon: path.join(__dirname, '../build/icons/icon'),
    // 最終的なビルドサイズを膨らませるファイルを無視する
    ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,
    // ビルドファイルを `builds` に保存する
    out: path.join(__dirname, '../build'),
    // ビルドファイルを上書きする
    overwrite: true,
    // プラットフォームを設定する環境変数
    platform: process.env.BUILD_TARGET || 'all'
}
```


================================================
FILE: docs/ja/using-static-assets.md
================================================
# 静的アセットの使用

もし以前に `vuejs-templates/webpack` ボイラープレートを使用したことがある場合、 `static/` ディレクトリに詳しいでしょう。ここは `main` プロセスや `renderer` プロセスが使用する静的アセットを配置する場所です。 これらのアセットを Vue アプリケーション内で使用するのは簡単ですが、フルパスを必要とする `fs` や他のモジュールで使用するのには少し難解です。幸いなことに、electron-vue は開発と本番で `static/` ディレクトリまでのパスを返却する `__static` 変数を提供しています。

### Vue コンポーネント内で `src` タグを使用する場合

画像を読み込むコンポーネントがありますが、他のタスクが完了するまで画像のパスが分からないとします。物事を簡単にするために、 `<img>` の src をバインドするために、 `data` 変数を使用しましょう。

**SomeComponent.vue**

```html
<template>
  <img v-bind:src="imageUrl">
</template>
<script>
  export default {
    data () {
      // URL が `static/` から始まることに注意してください
      return { imageUrl: 'static/imgs/unsplash.png' }
    }
  }
</script>
```

`webpack` は `unsplash.png` をバンドルしません。アプリケーションは `static/imgs/unsplash.png` ディレクトリ内を調べます。`vue-loader` のおかげで、全てのめんどくさいことを代わりにやってくれます。

### JS で `fs`、`path`、`__static` を使用する場合

`fs` を使用してアプリケーションに読み込む必要のある静的アセットがある場合、開発と本番の両方で `static/` ディレクトリまでの信頼できるパスを取得するにはどのようにすれば良いでしょうか?electron-vue は `static/`  ディレクトリまでの適切なパスを返却する `__static` という名前のグローバル変数を提供しています。ここでは、開発と本番の両方で簡単なテキストファイルを読むためにそれを使う方法を示します。

**static/someFile.txt**

```txt
foobar
```

**SomeFile.js (**`main`** プロセスもしくは **`renderer`** プロセス)**

```js
import fs from 'fs'
import path from 'path'
let fileContents = fs.readFileSync(path.join(__static, '/someFile.txt'), 'utf8')
console.log(fileContents)
// => "foobar"
```

本番では全てのファイルが強く推奨されている通り、デフォルトで [`asar`](https://github.com/electron/asar) でパッケージングされていることに注意してください。このため、この挙動を認識しているので、`static/` フォルダ内のアセットは `electron` 内でのみアクセスできます。例えば外部プログラムで開けるようにユーザにファイルを配布したい場合、これらのアプリケーションのアセットをユーザのドキュメントスペースまたはデスクトップにコピーする必要があります。そこからそれらのアセットを開くために [`shell.openItem()`](https://electron.atom.io/docs/api/shell/#shellopenitemfullpath)  という electron API を使用することができます。

この状況の別の解決策は特定のファイルを本番の `asar` アーカイブから "解凍" するように `electron-packager`/`electron-builder` を構成することです。electron-vue はこの方法をサポートする予定はありません。これに関連する課題、または設定方法に関する課題は終了します。


================================================
FILE: docs/ja/using_css_frameworks.md
================================================
# CSS フレームワークの使用

これは簡単なように思えるかもしれませんが、すでに用意されている [`style-loader`](https://github.com/webpack/style-loader) を使用してサードパーティの CSS ライブラリを webpack にインポートすることをお勧めします。

## ユースケース

アプリケーションに [bootstrap](http://getbootstrap.com/) 、 [bulma](http://bulma.io/) 、 [materialize](http://materializecss.com/) を使いたいとします。いつも通り `npm` からインストールしますが、 `index.ejs` に追加する代わりに、JavaScript 、特に `src/renderer/main.js` に CSS をインポートします。

#### 例

`bulma` をインストールしましょう

```bash
npm install bulma --save
```

それでは `src/renderer/main.js` にこの行を追加しましょう。

```bash
import 'bulma/css/bulma.css'
```

また、コンポーネントファイル内に `bulma` を含めることもできます。

**App.vue**

```html
<style>
  @import "~bulma/css/bulma.css";
</style>
```

`webpack` は `bulma` を読み込み、本番ビルドで使用できるようにします。


================================================
FILE: docs/ja/using_pre-processors.md
================================================
# プリプロセッサの使用

[`webpack`](https://github.com/webpack/webpack) で [`vue-loader`](https://github.com/vuejs/vue-loader) を使用することの大きな利点の一つは、特に努力せずに Vue コンポーネントファイル内で HTML/CSS/JS を直接前もって処理できることです。詳細は[**こちら**](https://jp.vuejs.org/v2/guide/single-file-components.html)を確認してください。

## ユースケース

CSS の前処理に Sass/SCSS を使う必要があるとします。まず、この構文を処理するために適切な `webpack` ローダーをインストールする必要があります。

#### `sass-loader` のインストール

```bash
npm install --save-dev sass-loader node-sass
```

必要なローダーがインストールされると、完成です。`vue-loader` は魔法のように残り作業をやってくれます。これで、Vue コンポーネントファイルに `lang="sass"` または `lang="scss"` を簡単に追加できます。 `sass-loader` の依存パッケージであるため、 `node-sass` もインストールしたことに注意してください。

#### `lang`  属性を適用する

これを...

```html
<style>
  body {
    /* CSS */
  }
</style>
```

...こうします...

```html
<style lang="scss">
  body {
    /* SCSS */
  }
</style>
```

他のプリプロセッサにも同じ原則が適用されます。JS に coffeescript が必要かもしれませんね?[coffeescript-loader](https://github.com/webpack/coffee-loader) をインストールして、 `<script>` タグに `lang="coffeescript"` 属性を適用するだけです。

この機能の高度な使い方については [vue-loader のドキュメント](http://vue-loader.vuejs.org/ja/configurations/pre-processors.html)を参照してください。

## Sass/SCSS のグローバル使用

CSS 構文に Sass/SCSS を使用する場合、全ての Vue コンポーネントファイルでグローバルな変数/ミックスインを使用できることはとても有益です。これを実現させる方法は次のとおりです。

### ユースケース

この例は `globals.scss` を全ての Vue コンポーネントファイルに適用する方法を示しています。このドキュメントでは上述の通り、開発環境ですでに `sass-loader` が設定されていることを前提としています。

#### グローバル変数を定義する

**src/renderer/globals.scss**

```scss
$brand-primary: blue;
$brand-accent: turquoise;
```

#### `globals.scss` を `node-sass` に直接注入する

**.electron-vue/webpack.renderer.config.js** で `vue-loader` の設定を編集する

```js
loaders: {
  sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1&data=@import "./src/renderer/globals"',
  scss: 'vue-style-loader!css-loader!sass-loader?data=@import "./src/renderer/globals";'
}
```

#### グローバル変数を使用する

**SomeComponent.vue**

```html
<style lang="scss">
  body { color: $brand-primary; }
</style>
```


================================================
FILE: docs/ja/using_the_file_structure.md
================================================
# Using the File Structure

electron-vue does its best to not force a particular project structure, but does try to follow common Vue & Electron practices. The following documentation describes common practices used in the original project structure.

**If you are unfamiliar with Electron's **`renderer`** and **`main`** processes, please give the first section of the **[**Quick Start**](http://electron.atom.io/docs/tutorial/quick-start)** a good read. It explains, in detail, their differences.**

### [Renderer Process](renderer-process.md)

### [Main Process](main-process.md)


================================================
FILE: docs/ja/vue_accessories.md
================================================
# Vue プラグイン

electron-vue には `vue-cli` でのスキャフォールディングの間にインストールできる次の `vue` プラグインが入っています...

- [axios ](https://github.com/mzabriskie/axios)(web リクエスト)
- [vue-electron](https://github.com/SimulatedGREG/vue-electron) (electron API を Vue オブジェクトに付け加える)
- [vue-router](https://github.com/vuejs/vue-router) (シングルページアプリケーションのルーティング)
- [vuex](https://github.com/vuejs/vuex) (Flux にインスパイアされたアプリケーションアーキテクチャ)

---

### [`axios`](https://github.com/mzabriskie/axios)

> ブラウザーと Node.js のための Promise ベースの HTTP クライアント

`vue-resource` をよく知っている場合、 `axios` はほとんどの API がほぼ同じであるため、とても馴染みやすいでしょう。`main` プロセススクリプトで簡単に `axios` をインポートしたり、 `renderer` プロセスで `this.$http` や `Vue.http` を使用することができます。

### [`vue-electron`](https://github.com/SimulatedGREG/vue-electron)

> electron API を Vue オブジェクトに付け加え、全てのコンポーネントからアクセス可能にする vue プラグイン。

electron API に `this.$electron` で簡単にアクセスできるようにするシンプルな `vue` プラグインです。全てのコンポーネントで `electron` をインポートする必要はありません。

### [`vue-router`](https://github.com/vuejs/vue-router)

> `vue-router`  は [Vue.js](http://jp.vuejs.org/) 公式のルーターです。Vue.js でシングルページアプリケーションを構築するために Vue.js のコアと深く結びついています。

提供されるプロジェクト構造は公式で提供されている `vuejs-templates/webpack` のボイラープレートの設定と似ているため馴染みやすいでしょう。

### [`vuex`](https://github.com/vuejs/vuex)

> Vuex は Vue.js アプリケーション向けの**状態管理パターンであり、ライブラリ**でもあります。アプリケーション内の全てのコンポーネントの集中型ストアとして機能し、状態を予測可能な方法でのみ変更できることを保証するルールを備えています。

提供されるプロジェクト構造はかなり最低限ですが、`vuex` のモジュールパターンを使用してデータストアを整理することを勧めます。`@/store/modules/index.js` は `vuex` のストアが全てのモジュールをワンショットでインポートできるようにします。


================================================
FILE: docs/ja/webpack-configurations.md
================================================
# Webpack構成

electron-vue には `.electron-vue/` ディレクトリに置かれた3つの別々の webpack 設定ファイルが入っています。 `web` 出力のオプションは別として、 `main` と `renderer`はセットアップが似通っています。どちらも `node@7` の機能を対象にするために `babel-preset-env` と `babili` を使用し、全てのモジュールを `externals` として扱います。

### `.electron-vue/webpack.main.config.js`

electron の `main` プロセスを対象にします。この構成はかなり最低限ですが、いくつかの一般的な `webpack` のプラクティスが含まれています。

### `.electron-vue/webpack.renderer.config.js`

electron の `renderer` プロセスを対象にします。この構成は Vue アプリケーションを取り扱うので、 `vue-loader` や公式の `vuejs-templates/webpack` ボイラープレートで使用可能なその他多くの構成が含まれます。

##### 外部依存のホワイトリスト化

この構成について考慮すべき重要なことの1つは、特定のモジュールを webpack `externals` として扱わないようにホワイトリストに登録できることです。この機能性が必要になるユースケースはあまりありませんが、 `*.vue` コンポーネントそのままを提供する Vue UI ライブラリーの場合は、ホワイトリストに登録が必要なため、 `vue-loader` はそれらをコンパイルできます。もう1つのユースケースは、フルコンパイラとランタイムビルドをインポートするために `vue` を設定するなどのような webpack の `alias` を使用する場合です。このため、 `vue` はすでにホワイトリストに入っています。

### `.electron-vue/webpack.web.config.js`

ブラウザ用に `renderer` プロセスのソースコードをビルド対象にします。この設定は web に公開する必要がある場合に強力な開始基盤として提供されています。**electron-vue は提供されているもの以上の web 出力をサポートしていません。**web 出力に関する課題は延期されるかクローズする可能性が高いでしょう。


================================================
FILE: docs/ko/README.md
================================================
![](../images/logo.png)

> vue로 구축 된 electron 애플리케이션을 만들기 위한 보일러 플레이트

[![Build Status](https://semaphoreci.com/api/v1/simulatedgreg/electron-vue/branches/master/badge.svg)](https://semaphoreci.com/simulatedgreg/electron-vue)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)

## 개요

이 프로젝트의 목적은 vue를 사용하는 Electron 앱을 수동으로 설정할 필요가 없도록 만드는 것 입니다. electron-vue는 스캐폴딩(발판)을 위한`vue-cli`, `webpack`과 `vue-loader`, `electron-packager` 또는 `electron-builder`, `vue-router`와 `vuex` 등과 같이 가장 많이 사용되는 플러그인들 등의 이점들을 취했습니다.

#### Check out the detailed documentation [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).

이 보일러플레이트에서 찾을 수 있는 것...

* **단일** `package.json` 설정으로된 기본 프로젝트 구조(다른 프로젝트는 두개 package.json 파일로 구성되어 있습니다.)
* 상세한 [문서](https://simulatedgreg.gitbooks.io/electron-vue/content/)
*  [vue-cli](https://github.com/vuejs/vue-cli)를 사용한 프로젝트 스캐폴딩
* Vue 플러그인을 사용한 준비가 되어 있습니다. \([axios](https://github.com/mzabriskie/axios), [vue-electron](https://github.com/SimulatedGREG/vue-electron), [vue-router](https://github.com/vuejs/vue-router), [vuex](https://github.com/vuejs/vuex)\)\*
* 설치된 [vue-devtools](https://github.com/vuejs/vue-devtools) 과 개발을 위한 [devtron](https://github.com/electron/devtron) 도구 
* [electron-packager](https://github.com/electron-userland/electron-packager) 또는 [electron-builder](https://github.com/electron-userland/electron-builder)를 사용하여 애플리케이션을 쉽게 패키징 할 수 있는 기능\*
* [electron-builder](https://github.com/electron-userland/electron-builder)를 이용한 자동화 배포를 위한 `appveyor.yml` 과  `.travis.yml`\*
* 브라우저 용 웹 출력 기능
* 편리한 [NPM scripts](https://simulatedgreg.gitbooks.io/electron-vue/content/en/npm_scripts.html)
* 핫 모듈 교체로 [webpack](https://github.com/webpack/webpack) 과 [vue-loader](https://github.com/vuejs/vue-loader) 사용
* electron의 메인 프로세스에서 작업 할 때 프로세스 재시작
* [vue-loader](https://github.com/vuejs/vue-loader/)를 사용한 HTML/CSS/JS 전처리기 지원
* 기본적으로 [`stage-0`](https://babeljs.io/docs/plugins/preset-stage-0/)으로된 ES6 
* [`babili`](https://github.com/babel/babili)를 사용하여 ES5로 완전히 내릴 필요성을 제거
* ESLint \([`standard`](https://github.com/feross/standard) 와 [`airbnb-base`](https://github.com/airbnb/javascript) 지원\)\*
* \(Karma + Mocha 로\) 단위 테스팅 *
* \(Spectron + Mocha 로\) End-to-end 테스팅 \*

\* vue-cli 스캐폴딩 중 사용자 정의 가능

### 시작하기

이 보일러플레이트는 [vue-cli](https://github.com/vuejs/vue-cli)를 위한 템플릿으로 제작되었으며 최종 스캐폴드 앱을 사용자 정의 할 수 있는 옵션을 포함하고 있습니다. `node@^7` 이상의 노드를 사용해야 합니다. 또한 electron-vue는 의존성을 훨씬 잘 처리하고 `yarn clean`으로 최종 빌드 크기를 줄일 수 있는 [`yarn`](https://yarnpkg.org) 패키지 매니저를 공식적으로 추천합니다.

```bash
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# Install dependencies and run your app
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

##### Windows 사용자 입니까?

electron 및 기타 의존성에 필요한 모든 빌드 도구가 있는 지 확인하려면 [**A Note for Windows Users**](https://simulatedgreg.gitbooks.io/electron-vue/content/ko/getting_started.html#a-note-for-windows-users)를 확인하세요.

##### Vue 1을 사용하고 싶나요?

 `1.0` 브랜치를 가리키기만 하세요. 하지만 electron-vue는 `vue@^1`의 사용을 공식적으로 권장하지 않습니다. 따라서 프로젝트 구조, 기능 및 문서는 이러한 변경 사항을 반영합니다.([**legacy documentation**](https://github.com/SimulatedGREG/electron-vue/tree/1.0/docs)).

```bash
vue init simulatedgreg/electron-vue#1.0 my-project
```

### 다음 단계

[documentation](https://simulatedgreg.gitbooks.io/electron-vue/content/)를 면밀히 살펴보세요. 이 문서에서 구성, 프로젝트 구조, 앱 빌드에 대한 유용한 정보가 있습니다. 또한 편리한 [FAQs](https://simulatedgreg.gitbooks.io/electron-vue/content/en/faqs.html) 섹션도 있습니다.


## electron-vue로 만든 프로젝트
electron-vue로 만들어진 몇 가지 놀라운 프로젝트를 살펴보세요. 여러분의 프로젝트가 목록에 추가를 원하시면 언제든지 pull request를 보내 주시기 바랍니다.

* [**Surfbird**](https://github.com/surfbirdapp/surfbird): A Twitter client built on Electron and Vue
* [**Lulumi-browser**](https://github.com/qazbnm456/lulumi-browser): Lulumi-browser is a light weight browser coded with Vue.js 2 and Electron
* [**Space-Snake**](https://github.com/ilyagru/Space-Snake): A Desktop game built with Electron and Vue.js.
* [**Forrest**](https://github.com/stefanjudis/forrest): An npm scripts desktop client
* [**miikun**](https://github.com/hiro0218/miikun): A Simple Markdown Editor
* [**Dakika**](https://github.com/raj347/Dakika): A minute taking application that makes writing minutes a breeze
* [**Dynamoc**](https://github.com/ieiayaobb/dynamoc): Dynamoc is a GUI client for dynamodb-local, dynalite and AWS dynamodb
* [**Dockeron**](https://github.com/dockeron/dockeron): A dockeron project, built on Electron + Vue.js for Docker
* [**Easysubs**](https://github.com/matiastucci/easysubs): Download subtitles in a very fast and simple way
* [**adminScheduler**](https://github.com/danieltoorani/adminScheduler): An application leveraging electron for cross platform compatibility, Vue.js for lightning fast UI and full-calendar.io to deliver a premium calendar interface.
* [**Backlog**](https://github.com/czytelny/backlog): Simple app for storing TODOs, ideas or backlog items. You can organize them with boards. Sleek flow. Built with Electron + Vue.js + iView
* [**Opshell**](https://github.com/ricktbaker/opshell): Ops tool to make life easier working with AWS instances.
* [**GitHoard**](https://github.com/jojobyte/githoard): Hoard git repositories with ease.
* [**Data-curator**](https://github.com/ODIQueensland/data-curator): Share usable open data.
* [**Bookmark**](https://github.com/mrgodhani/bookmark): Desktop app to manage bookmarked links using Atom Electron and Vue.js
* [**Uber Run**](https://github.com/break-enter/uberrun): Simple automation desktop app to download and organize your tax invoices from Uber.
* [**Netsix**](https://github.com/pulsardev/netsix): Share videos with your friends in a real peer-to-peer manner using WebRTC.
* [**code-notes**](https://github.com/lauthieb/code-notes): A simple code snippet manager for developers built with Electron & Vue.js.
* [**Pomotroid**](https://github.com/Splode/pomotroid): A simple and visually-pleasing Pomodoro timer
* [**MarkText**](https://github.com/marktext/marktext): Mark Text is a realtime Markdown Editor.
* [**vue-design**](https://github.com/L-Chris/vue-design): the best website visualization builder with Vue and Electron
* [**ImapSync Client**](https://github.com/ridaamirini/ImapSyncClient): It's only an Internet Message Access Protocol Synchronization Client
* [**Hve**](https://github.com/hellohve/hve): A static blog client tool you may like.
* [**MarkdownFox**](https://github.com/lx4r/markdownfox): A simple Markdown viewer with auto update and PDF export.
* [**Cleaver**](https://getcleaver.com/): Cleaver helps you provision servers ready for deploying your web apps with zero downtime - for free!


================================================
FILE: docs/ko/SUMMARY.md
================================================
# Summary

* [Introduction](./README.md)
* [Getting Started](getting_started.md)
* [Project Structure](project_structure.md)
  * [File Tree](file-tree.md)
  * [Renderer Process](renderer-process.md)
  * [Main Process](main-process.md)
  * [Webpack Configurations](webpack-configurations.md)
* [Development](development.md)
  * [Entry index.html](entry_indexhtml.md)
  * [Vue Plugins](vue_accessories.md)
  * [NPM Scripts](npm_scripts.md)
  * [Using CSS Frameworks](using_css_frameworks.md)
  * [Using Pre-Processors](using_pre-processors.md)
  * [Using Static Assets](using-static-assets.md)
  * [Read & Write Local Files](savingreading-local-files.md)
  * [Debugging](debugging-production.md)
* [Building Your App](building_your_app.md)
  * [Using electron-packager](using-electron-packager.md)
  * [Using electron-builder](using-electron-builder.md)
* [Testing](testing.md)
  * [Unit Testing](unittesting.md)
  * [End-to-End Testing](end-to-end_testing.md)
* [Meta](meta.md)
  * [FAQs](faqs.md)
  * [New Releases](new-releases.md)
  * [Migration Guide](migration-guide.md)
  * [Contributing](contributing.md)



================================================
FILE: docs/ko/book.json
================================================
{
  "root": ""
}


================================================
FILE: docs/ko/building_your_app.md
================================================
# 앱 빌드하기

electron-vue는 프로덕션 준비가 완료된 애플리케이션을 빌드 및 배포 할 수 있는 [electron-packager](https://github.com/electron-userland/electron-packager)와 [electron-builder](https://github.com/electron-userland/electron-builder)를 지원합니다. 두 가지 빌드 도구는 놀라운 [@electron-userland](https://github.com/electron-userland) 커뮤니티의 뒷받침으로 각각 자세한 문서가 있습니다. `vue-cli` 스캐폴딩 중 어떤 빌더를 사용할 지 묻는 메시지가 표시됩니다.

## [`electron-packager`](using-electron-packager.md)

electron 애플리케이션을 처음 사용하거나 간단한 실행 파일만 작성해야하는 경우 `electron-packager`는 여러분의 요구에 완벽할 것 입니다.

## [`electron-builder`](using-electron-builder.md)

완전한 설치 관리자, 자동 업데이트 지원, Travis CI 및 AppVeyor를 사용한 CI 구축 또는 기본 노드 모듈 재구성 자동화를 원할 경우 `electron-builder`가 좋을 것 입니다.



================================================
FILE: docs/ko/contributing.md
================================================
# Contributing
이 보일러플레이트를 돕고 싶나요? 자유롭게 pull request를 제출하세요. 제출 준비를 하기 전에 다음을 확인하세요...

### JavaScript 표준 스타일
모든 JS가 기본 ***style standards*** 을 따르는 지 확인하려면 이 [rules](http://standardjs.com/#rules)을 따르는 지 확인하세요.

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

================================================
FILE: docs/ko/debugging-production.md
================================================
# Debugging

### Main Process

개발 중인 애플리케이션을 실행할 때, 여러분은 원격 디버거를 언급하는 `main` 프로세스에서 메시지를 발견했을 수도 있습니다. `electron@^1.7.2`가 출시 된 이래로 Inspect API를 통한 원격 디버깅이 도입되었으며 Google 크롬 또는 기본 포트 5858을 사용하는 프로세스(Visual Studio Code)에 원격으로 연결할 수 있는 다른 디버거를 제공된 링크를 열면 쉽게 액세스 할 수 있습니다.

```bash
┏ Electron -------------------

  Debugger listening on port 5858.
  Warning: This is an experimental feature and could change at any time.
  To start debugging, open the following URL in Chrome:
      chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5858/22271e96-df65-4bab-9207-da8c71117641

┗ ----------------------------
```

### Production Builds

###### Notice

프로덕션 환경에서 애플리케이션을 디버그하는 것이 가능할 수도 있지만 개발 중에 발견 된 것과 비교하여 프로덕션 코드가 축소되어  읽을 수 없다는 것을 알고 있으세요.

##### `renderer` Process

현재 개발중인 것보다 큰 차이점이 없습니다. [`BrowserWindow` APIs](https://electron.atom.io/docs/api/web-contents/#contentsopendevtoolsoptions)를 사용하여 개발자 도구를 간단하게 호출 할 수 있습니다. 초기 electron-vue 설정을 사용하여 `src/main/index.js` 안에 다음과 같은 코드 스니펫을 추가 할 수 있습니다. `new BrowserWindow` 구축 직후, 개발 도구를 강제로 열 수 있습니다.

```js
mainWindow.webContents.openDevTools()
```

##### `main` Process

위에서 언급 한 것과 비슷하게 `main` 프로세스에 외부 디버거를 연결하여 애플리케이션을 원격 디버깅 할 수도 있습니다. 프로덕션 환경에서 디버거를 활성화하려면 `src/main/index.js`에서 `app`을 import 후에 다음 스니펫을 추가하면 됩니다. 그런 다음 Google 크롬에서 `chrome://inspect`를 통해 연결하여 탐색 할 수 있습니다.

```js
app.commandLine.appendSwitch('inspect', '5858')
```





================================================
FILE: docs/ko/development.md
================================================
# Development

### 개발 설정 시작하기

`yarn` 또는 `npm install`을 사용하여 종속성을 설치 한 후, 실행합니다.

```bash
yarn run dev # or npm run dev
```

... 뿜! 실행 중인 electron-vue 앱이 있습니다.
![](../images/landing-page.jpg)

이 보일러플레이트는 쉽게 제거할 수 있는 몇 가지 landing-page components가 있습니다.



================================================
FILE: docs/ko/end-to-end_testing.md
================================================
# End-to-End Testing

electron-vue makes use of [Spectron](http://electron.atom.io/spectron/) and the [Mocha](https://mochajs.org/) \(with [Chai](http://chaijs.com/)\) test framework for end-to-end testing. Mocha & Chai APIs, including `expect`, `should`, and `assert`, are made available in global scope.

### Running tests

```bash
# Begin Mocha
npm run e2e
```

##### Note

Before running end-to-end tests, a `npm run pack` is called to create a production build that Spectron can consume during tests.

### File Structure

```
my-project
├─ test
|  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ utils.js
```

**For the most part, you can ignore **`index.js`** and focus solely on writing **`specs/`**.**

#### `specs/`

Inside this directory is where actual tests are written. Thanks to the power of `babel-register`, you have full access to ES2015.

#### `index.js`

This file acts as the main entry to Mocha and gathers all tests written in `specs/` for testing.

#### `utils.js`

Here you will find generic functions that could be of use throughout your `specs/`. Base functions include a `beforeEach` and `afterEach` that handle the electron creation/destruction process.

### On the subject of Spectron

Spectron is the official [electron](http://electron.atom.io) testing framework that uses both [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) and [WebDriverIO](http://webdriver.io/) for manipulating DOM elements.

#### Using WebDriverIO

As stated in the Spectron [documentation](https://github.com/electron/spectron#client), access to [WebDriverIO APIs](http://webdriver.io/api.html) can be accessed through `this.app.client`. Since electron-vue uses Mocha, the context of `this` is shared between `afterEach`, `beforeEach`, and `it`. Because of this, it is important to note that ES2015 arrow functions cannot not be used in certain situations as the context of `this` will be overwritten \([more info](https://mochajs.org/#arrow-functions)\).



================================================
FILE: docs/ko/entry_indexhtml.md
================================================
# Entry `index.html`

electron-vue는 프로덕션 빌드 중 [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-plugin)을 사용하여 `index.html`을 만듭니다.
여러분은 개발 중에 `src/` 디렉토리에서 `index.ejs`를 발견할 것 입니다. 여기서 엔트리 HTML 파일을 변경 할 수 있습니다.

이 플러그인의 작동 방식에 익숙하지 않은 경우, 이 [문서](https://www.npmjs.com/package/html-webpack-plugin)를 읽기 바랍니다. 간단히 말해, 이 플러그인은 `renderer.js`과 `styles.css`을 포함한 프로덕션 assets을 최종으로 축소된 index.html에 자동으로 삽입합니다.

### 개발 할 때 `index.ejs`

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <%= ... %>
  </head>
  <body>
    <div id="app"></div>
    <!-- webpack builds are automatically injected -->
  </body>
</html>
```

### 프로덕션의 `index.html` \(non-minified\)

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>app</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div id="app"></div>
    <script type="text/javascript" src="renderer.js"></script>
  </body>
</html>
```

### CDNs 사용에 관하여

CDN에서 제공되는 assets을 사용하면 애플리케이션의 최종 빌드 사이즈에 득이 되지만 사용하지 않는 것을 권합니다. 주된 이유는 여러분은 애플리케이션이 인터넷에 항상 액세스 할 수 있다고 가정하지만 Electron 앱의 경우 항상 그렇지 않습니다. 이는 bootstrap 같은 CSS 프레임워크에서 중요한 이슈가 됩니다. 여러분의 앱은 아주 빠른 속도로 스타일이 없는 난잡한 상태가 될 수 있습니다.

> "나는 이를 신경쓰지 않고 CDN을 계속 사용하고 싶습니다."

CDN을 계속 사용하기로 결정한 경우, `src/index.ejs`에 태그를 추가하여 계속해서 사용 할 수 있습니다. 다만, 앱이 오프라인 일 때 적절한 UI/UX 플로우를 설정하길 바랍니다.


================================================
FILE: docs/ko/faqs.md
================================================
# FAQs

* [Why is my electron app blank after running `npm run dev`?](#why-is-my-electron-app-blank-after-running-npm-run-dev)
* [Why does my electron app show a file explorer?](#why-does-my-electron-app-show-a-file-explorer)
* [Why is `vue-devtools`/`devtron` missing?](#why-is-vue-devtoolsdevtron-missing)
* [Where do I put Static Assets?](#where-do-i-put-static-assets)
* [Why did `npm run lint` end with an error?](#why-did-npm-run-lint-end-with-an-error)
* [Why can't I load my app in a web browser?](#why-cant-i-load-my-app-in-a-web-browser)
* [How do I import `jquery`?](#how-do-import-jquery)
* [How can I debug the `main` process?](#how-can-i-debug-the-main-process)

---

## Why is my electron app blank after running `npm run dev`?

#### TL;DR

Make sure you don't have a personal **proxy** setup that could tamper with `webpack-dev-server`.

## Why does my electron app show a file explorer?

#### TL;DR

Your `src/renderer` contains error\(s\). Check console, fix errors, then refresh electron with `CommandOrControl+R`.

##### Long answer

If error\(s\) are present in you `src/renderer` this creates conflicts with ESLint on first run. In turn, an INVALID webpack `renderer.js` is produced which interrupts `HtmlWebpackPlugin` from creating `index.html`. Since `webpack-dev-server` doesn't have the `index.html` ready to serve, the server falls back to the file explorer.

## Why is `vue-devtools`/`devtron` missing?

Make sure to close and reopen the developer tools panel on first launch if they are missing. Also check your terminal check for any error messages that may occur during installation.

## Where do I put Static Assets?

[**Using Static Assets**](using-static-assets.md)

## Why did `npm run lint` end with an error?

The default nature of eslint is to print linting errors to console, and if there is any found the script will end with a non-zero exit \(which produces npm errors\). This is normal behavior.

## Why can't I load my app in a web browser?

[\#195](https://github.com/SimulatedGREG/electron-vue/issues/195)

## How do import `jquery`?

If you are wanting to use `bootstrap`, I'm going to have to stop you right there. Using both `vue` and `jquery` in the same environment is a bad practice and leads to the two frameworks colliding with each other. I would highly recommend using a `bootstrap` alternative that uses `vue` for its JavaScript functionality. Some recommendations include [`bootstrap-vue`](https://github.com/bootstrap-vue/bootstrap-vue) and [`vue-strap`](https://github.com/yuche/vue-strap). For whatever reason you must use `jquery`, seek guidance from `webpack`'s documentation about the `ProvidePlugin` or see [\#192](https://github.com/SimulatedGREG/electron-vue/issues/192).

## How can I debug the `main` process?

When using `electron@^1.7.2` you can open up Google Chrome, head to `chrome://inspect`, and then pop open the remote electron process while your application is running in development mode.

[Electron Documentation](https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md)



================================================
FILE: docs/ko/file-tree.md
================================================
# 파일 트리

### 개발 파일 트리

**Note**: 일부 파일,폴더는 `vue-cli` 스캐폴딩 중 선택한 설정에 따라 다를 수 있습니다..

```
my-project
├─ .electron-vue
│  └─ <build/development>.js files
├─ build
│  └─ icons/
├─ dist
│  ├─ electron/
│  └─ web/
├─ node_modules/
├─ src
│  ├─ main
│  │  ├─ index.dev.js
│  │  └─ index.js
│  ├─ renderer
│  │  ├─ components/
│  │  ├─ router/
│  │  ├─ store/
│  │  ├─ App.vue
│  │  └─ main.js
│  └─ index.ejs
├─ static/
├─ test
│  ├─ e2e
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ utils.js
│  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
│  │  └─ karma.config.js
│  └─ .eslintrc
├─ .babelrc
├─ .eslintignore
├─ .eslintrc.js
├─ .gitignore
├─ package.json
└─ README.md
```

#### 프로덕션 빌드 파일 트리

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```

여러분도 알 수 있듯이 거의 모든 것이 최종 프로덕션 빌드에서 제거 됩니다. 사용자가 큰 파일 크기로 부푼 소프트웨어를 다운로드하는 것을 원하지 않으므로 electron 앱을 배포 할 때는 거의 필수 입니다.






================================================
FILE: docs/ko/getting_started.md
================================================
# 시작하기

## 스캐폴딩

이 보일러플레이트는 [vue-cli](https://github.com/vuejs/vue-cli) 템플릿으로 제작되었으며 최종 스캐폴드 된 애플리케이션을 사용자 정의 하는 옵션을 포함합니다. `node@^7` 또는 그 이상의 버전을 사용해야합니다. 또한 electron-vue는 의존성을 훨씬 잘 처리하고 `yarn clean`으로 최종 빌드 크기를 줄일 수 있는  [`yarn`](https://yarnpkg.org) 패키지 매니저를 공식적으로 추천합니다.

```bash
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project

# Install dependencies and run your app
cd my-project
yarn # or npm install
yarn run dev # or npm run dev
```

#### electron에 관해서

선택사항이지만 프로젝트를 스캐폴딩 후에 electron 버전을 잠그는 것을 권장합니다.이렇게하면 같은 프로젝트에서 작업하는 다른 개발자가 다른 버전으로 개발하는 것을 방지 할 수 있습니다. Electron은 릴리스를 자주 사용하므로 기능이 항상 변경 될 수 있습니다. [More Info](http://electron.atom.io/docs/tutorial/electron-versioning/).

#### Windows 사용자를 위한 노트

`node-gyp`에 대한 `npm install` 중에 오류가 발생하면 시스템에 적절한 빌드 도구가 설치되어 있지 않을 가능성이 높습니다. 빌드 도구에는 Python 및 Visual Studio와 같은 항목이 포함됩니다. [@felixrieseberg](https://github.com/felixrieseberg)에게 감사드립니다. 이 프로세스를 단순화하는 데 도움이 되는 몇 가지 패키지가 있습니다.

우리가 점검해야 할 첫 번째 항목은 npm 버전이 구식이 아닌지 확인하는 것입니다. [`npm-windows-upgrade`](https://github.com/felixrieseberg/npm-windows-upgrade)를 사용하여 수행 할 수 있습니다. 만약 yarn을 사용한다면, 여러분은 이러한 확인을 건너뛸 수 있습니다.

완료되면 필요한 빌드 도구를 이어서 설정할 수 있습니다. [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools)를 사용하면 대부분의 더러운 작업이 완료됩니다. 전역으로 설치하면 Visual C ++ 패키지, Python 등을 차례로 설치하게 됩니다.

이 시점에서 성공적으로 설치해야하지만, 그렇지 않은 경우에는 Visual Studio를 새로 설치해야합니다. 이는 electron-vue의 문제가 아님에 주의하세요. \(Windows는 때로는 어려울 수 있습니다. ¯\\\_\(ツ\)\_/¯\).


================================================
FILE: docs/ko/global_configuration.md
================================================
# Global Configuration

electron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre-processing, bundling, and building your app. The default settings are rather common and should meet most of your needs. An additional `config.js` is provided in the root directory for quick adjustments. Further customization can be made by directly adjusting `webpack.main.config.js` and `webpack.renderer.config.js`.

#### `config.js`
**Note**: Some options may differ based on the settings choosen during `vue-cli` scaffolding.

```js
{
  // Name of electron app
  // Will be used in production builds
  name: 'app',

  // Use ESLint
  // Further changes can be made in `.eslintrc.js`
  eslint: true,

  // webpack-dev-server port
  port: 9080,

  // electron-packager options
  // See `Building you app` for more info
  building: {
    arch: 'x64',
    asar: true,
    dir: path.join(__dirname, 'app'),
    icon: path.join(__dirname, 'app/icons/icon'),
    ignore: /\b(src|index\.ejs|icons)\b/,
    name: pkg.name,
    out: path.join(__dirname, 'builds'),
    overwrite: true,
    platform: process.env.PLATFORM_TARGET || 'all'
  }
}
```


================================================
FILE: docs/ko/main-process.md
================================================
# Main Process

> Electron에서 package.json의 main 스크립트를 실행하는 프로세스를 main 프로세스라고 합니다. main 프로세스에서 실행되는 스크립트는 웹 페이지를 생성하여 GUI를 표시 할 수 있습니다.

[**Electron 문서**](http://electron.atom.io/docs/tutorial/quick-start/#main-process)**로 부터**

---

`main` 프로세스는 근본적으로 완전한 Node 환경이기 때문에 두 파일 이외의 초기 프로젝트 구조는 존재하지 않습니다.

#### `src/main/index.js`

이 파일은 애플리케이션의 main 파일이며 `electron`을 부팅하는 파일 입니다. `webpack`의 프로덕션 용 엔트리 파일로도 사용됩니다. 모든 `main` 프로세스 작업은 여기서 시작해야 합니다.

#### `app/src/main/index.dev.js`

이 파일은 특별히 `electron-debug` & `vue-devtools`를 설치하기 때문에 개발에만 사용됩니다. 이 파일을 수정할 필요가 없지만 개발 요구사항을 확장하는 데 사용할 수 있습니다.

## `__dirname` & `__filename` 사용에 관하여

`webpack`을 사용하여 `main` 프로세스는 번들되기 때문에, `__dirname` & `__filename`은 프로덕션에서 예상 값을 **제공하지 않습니다**. [**File Tree**](/file-tree.md)를 보면, main.js가 `dist/electron` 폴더 안에 위치 함을 알 수 있습니다. 이 지식을 바탕으로 적절하게 `__dirname` & `__filename`를 사용하세요.

`static/` **assets 디렉토리에 대한 경로가 필요한 경우, **[**Static Assets 사용법**](/using-static-assets.md)을 읽으세요. __static 변수는 정말 유용합니다.**

```
app.asar
├─ dist
│  └─ electron
│     ├─ static/
│     ├─ index.html
│     ├─ main.js
│     └─ renderer.js
├─ node_modules/
└─ package.json
```





================================================
FILE: docs/ko/meta.md
================================================
# Meta

### Thank You

Wow, thank you guys so much for helping make electron-vue one of the top 3`vue-cli`templates \(that I can find\) on GitHub. I never thought this project would ever take off like it has today. Thinking back, I originally made this boilerplate \(in **May 2016**\) for a personal closed sourced project and decided to open source \(the boilerplate itself\) when I knew I had a majority of the pieces together. Fast-forward to today and there have been so many new features implemented and amazing support from the community. I also want to give a special shoutout to those in the community helping answer issues when I'm not able to. You guys have absolutely no obligation to do anything but you do anyway, and I am grateful for that.

If you are reading this, then I can almost assume you really do enjoy electron-vue. A lot of time was spent creating this boilerplate. If you are feeling generous, then feel free to leave a tip if you want. Surely future development of electron-vue is not dependent upon donations, but its always an option if you decide to use it.

#### [**PayPal.me**](https://www.paypal.me/simulatedgreg/5) 





================================================
FILE: docs/ko/migration-guide.md
================================================
# Migration Guide

The following documentation attempts to explain how migrating your project _should_ be accomplished, but may not be a full proof method as overall project structure is always up for change.

1. Scaffold a fresh version of electron-vue using `vue init simulatedgreg/electron-vue my-project`
2. Copy over current project `src` files into the new scaffold's `src` directory
3. Copy over `package.json` dependencies from current project to the new scaffold's `package.json`
4. Install dependencies with `yarn` or `npm install`
5. Run project in development mode \(`yarn run dev` or `npm run dev`\)
6. Watch console for errors to fix

Just as previously mentioned above, there isn't a full proof method for migrating to a new scaffold, but these are typically going to be the major steps to get you nearly all the way there. Any personal modifications to project structure or handling of assets will be up to you or your team to migrate. Make sure to check out the rest of the documentation as it will always reflect the current version of electron-vue from the `master` branch.



================================================
FILE: docs/ko/miscellaneous.md
================================================


================================================
FILE: docs/ko/new-releases.md
================================================
# New Releases

electron-vue has evolved greatly since its initial creation in May of 2016 and has introduced many new fantastic features. Can you believe there was a time `vue-cli` scaffolding wasn't supported? Development of new features is not planned to end anytime soon. The only down side to new bells & whistles every now and then is having your project stuck on an older scaffold. Since electron-vue takes advantage of `vue-cli` there unfortunately isn't a structured way to _version_ the boilerplate or make it _updatable_.

Major updates of electron-vue will be made through GitHub Milestones and will include many new features/bug fixes at a time, making these releases the optimal time to [migrate](/migration-guide.md) any existing projects to a newer scaffold. These milestones are not usually planned, but arise as feature requests add up in the issue tracker.

### Past Milestones

#### [Multiplex](https://github.com/SimulatedGREG/electron-vue/milestone/1?closed=1)

* Migration to `webpack` 2
* Support for `electron-builder`
* Support for `main` process bundling
* General bugfixing

#### [Minimize](https://github.com/SimulatedGREG/electron-vue/issues/171)

* Migration to single `package.json` structure
* Travis CI / AppVeyor configs for `electron-builder` users
* Minimal web output of `renderer` process
* Migration to `axios`
* Full support for `main` process bundling
* Rewrite of development and build scripts
* Migration to `babili` to remove the need of transpiling down completely to ES5
* Support for `static/` assets when using modules that require a full path \([`__static`](/using-static-assets.md)\)





================================================
FILE: docs/ko/npm_scripts.md
================================================
# NPM Scripts

개발 프로세스에 대한 중복 작업을 제거하려면, 사용 가능한 NPM 스크립트 중 일부를 기록해 두세요. 다음 명령은 프로젝트의 루트 디렉토리에서 실행해야합니다. `yarn run <command>`를 사용하여 아래 명령어 중 하나를 실행할 수도 있습니다.

### `npm run build`

프로덕션과 패키지 용 앱을 빌드 합니다. 더 자세한 정보는 [**Building Your App**](building_your_app.md) 섹션을 참조하세요.

### `npm run dev`

개발 중인 앱을 실행합니다.

### `npm run lint`

모든 `src/`와 `test/`의 JS & Vue component 파일을 Lint 합니다.

### `npm run lint:fix`

모든 `src/`와 `test/`의 JS & Vue component 파일을 Lint하고 문재 해결을 시도합니다.

### `npm run pack`

`npm run pack:main` & `npm run pack:renderer` 둘 다 실행합니다. 이러한 명령어를 사용 할 수 있지만, `npm run build`로 이 단계를 처리 할 때 수동으로 수행하는 경우는 많지 않습니다.

### `npm run pack:main`

`main` 프로세스 소스 코드를 번들하기 위해 webpack을 실행합니다.

### `npm run pack:renderer`

`renderer` 프로세스 소스 코드를 번들하기 위해 webpack을 실행합니다.

### `npm run unit`

Karma와 Jasmine로 단위 테스트를 실행합니다. 자세한 내용은 [**Unit Testing**](unittesting.md)를 참조하세요.

### `npm run e2e`

Spectron + Mocha로 end-to-end 테스트를 실행합니다. 자세한 내용은 [**End-to-end Testing**](end-to-end_testing.md)를 참조하세요.

### `npm test`

`npm run unit` & `npm run e2e` 둘 다 실행합니다. 자세한 내용은 [**Testing**](testing.md)을 참조하세요.


================================================
FILE: docs/ko/project_structure.md
================================================
# 프로젝트 구조

electron-vue 프로젝트 구조는 Electron App을 만들 때와  조금 다릅니다. 이전에 공식 [`vuejs-templates/webpack`](https://github.com/vuejs-templates/webpack) 설정을 사용했다면, 구조가 매우 유사하다고 느낄 것 입이다. 
이 섹션의 문서는 보일러 플레이트가 작동하는 방법의 개요와 애플리케이션을 빌드 할 때의 차이점을 설명하려고합니다. 이번 섹션의 문서는 보일러플레이트가 어떻게 작동하는지에 대한 일반적인 개요와 애플리케이션을 만들 때의 차이점을 설명합니다.

### 단일 `package.json` 설정

예전에는 두 개의 `package.json` 설정이 필요 했지만 [@electron-userland](https://github.com/electron-userland)의 노력 덕분에 [`electron-packager`](https://github.com/electron-userland/electron-packager)와 [`electron-builder`](https://github.com/electron-userland/electron-builder) 둘 다 지금은 완전히 단일 `package.json` 설정을 지원합니다.

#### `dependencies`

dependencies는 최종 프로덕션 앱에 **포함 됩니다**. 그러므로 애플리케이션에 특정 모듈이 필요하다면 여기에 설치하세요!

#### `devDependencies`

devDependencies는 최종 프로덕션 앱에 **포함되지 않습니다**. 여기에는 빌드 스크립트, `webpack` loaders 등과 같은 개발을 위해 특별히 필요한 모듈을 설치할 수 있습니다.

#### Native NPM Modules 설치하기

우리는 네이티브 npm 모듈이 electron을 고려하여 빌드되었는지 확인해야합니다. 그러기 위해 우리는 [`electron-rebuild`]를 사용 할 수 있습니다.(https://github.com/electron/electron-rebuild), 그러나 더 간단하게하기 위해, 많은 작업을 처리하는 [`electron-builder`](https://github.com/electron-userland/electron-builder) 빌드 도구를 사용하는 것을 더욱 추천합니다.

### `main` 프로세스에 관해서

개발 중에 `src/main/index.dev.js`를 주목 했을 수도 있습니다. 이 파일은 특별히 개발 용으로 사용되며 dev-tools를 설치하는 데 사용됩니다. 이 파일은 수정할 필요가 없지만 개발 요구를 확장하는 데 사용할 수 있습니다. 빌드가 끝나면 `webpack`은 `src/main/index.js`와 함께 번들을 생성하여 엔트리 파일로 만듭니다.

================================================
FILE: docs/ko/renderer-process.md
================================================
# Renderer Process

> Electron는 웹 페이지를 표시하는 데 Chromium을 사용하므로 Chromium의 다중 프로세스 아키텍처도 사용됩니다. Electron의 각 웹 페이지는 렌더러 프로세스라고하는 자체 프로세스에서 실행됩니다.
>
> 일반 브라우저에서 웹 페이지는 일반적으로 샌드박스 환경에서 실행되며 기본 리소스에 대한 액세스가 허용되지 않습니다. 그러나 Electron 사용자는 웹페이지에서 운영체제와 상호작용하는 Node.js API를 사용 할 수 있습니다.

[**Electron 문서**](http://electron.atom.io/docs/tutorial/quick-start/#renderer-process)**에서**

---

## `vue`와 `vuex`에 관하여

### vue components

Vue components에 익숙하지 않은 경우, [이걸](http://vuejs.org/v2/guide/single-file-components.html) 읽어 주세요. components를 사용하면 대규모의 복잡한 애플리케이션을 보다 구조화 할 수 있습니다. 각 component에는 자체 CSS, 템플릿 및 JavaScript 기능을 캡슐화하는 기능이 있습니다.

Components `src/renderer/components`에 저장됩니다. child components를 만들 때 parent component의 이름이 있는 새 폴더 안에 배치하는 것이 일반적인 구조 관례 입니다. 이 관례는 특히 다른 경로로 조정할 때 특히 유용합니다.

```
src/renderer/components
├─ ParentComponentA
│  ├─ ChildComponentA.vue
│  └─ ChildComponentB.vue
└─ ParentComponentA.vue
```

### vue routes

`vue-router` 대한 자세한 내용은 [여기](https://github.com/vuejs/vue-router)를 클릭하세요. 간단히 말해, Electron 애플리케이션을 만들 때, 단일 페이지 애플리케이션을 만드는 것이 훨씬 실용적이므로 `vue-router`를 사용하는 것이 좋습니다. 많은 수의 BrowserWindows를 관리하고 모든 정보를 교환하고 싶습니까? 아마도 그렇지 않을 겁니다.

Routes는 `src/renderer/router/index.js`에 저장되며 다음과 같이 정의 됩니다.

```js
{
  path: '<routePath>',
  name: '<routeName>',
  component: require('@/components/<routeName>View')
}
```

`<routePath>`와 `<routeName>`은 둘 다 변수 입니다. 이러한 routes는 `src/renderer/App.vue`에서 `<router-view>` 지시문을 사용하여 components 트리에 연결됩니다.

##### Notice

`vue-router`를 사용하는 경우, [**HTML5 History Mode**](http://router.vuejs.org/en/essentials/history-mode.html)를 사용하지 마세요. 이 모드는 http 프로토콜을 통해 파일을 제공하기 위한 것이고 프로덕션 빌드에서 Electron이 파일을 제공하는 `file` 프로토콜에서는 제대로 작동하지 않습니다. 디폴트 `hash` 모드는 필요한 것 입니다.

### vuex modules

`vuex`를 설명하는 것은 쉬운 일이 아니기 때문에 어떤 문제를 해결하려고하고 있는지, 어떻게 작동 하는지를 더 잘 이해하기 위해 [이걸](https://vuex.vuejs.org/guide/) 읽어 보시기 바랍니다.

electron-vue는 `vuex`의 모듈 구조를 이용하여 여러 데이터 stores를 만들고 `src/renderer/store/modules`에 저장합니다.

여러 데이터 저장소를 보유하면 조직에 적합 할 수 있지만 각각을 가져와야하는 것은 귀찮습니다. 그러나 `src/renderer/store/modules/index.js`가 우리를 위해 더러운 작업을하기 때문에 무서워하지 마세요! 이 작은 스크립트는 `src/renderer/store/index.js`가 모든 모듈을 한 번에 가져올 수 있도록합니다. 모든 것이 이해가되지 않는다면, 주어진 `Counter.js` 모듈을 쉽게 복제 할 수 있다는 것을 알면 "마술처럼" 로드 될 것 입니다.


================================================
FILE: docs/ko/savingreading-local-files.md
================================================
# Read & Write Local Files

`electron` 사용의 큰 이점 중 하나는 사용자의 파일 시스템에 액세스 할 수 있다는 것 입니다. 여러분은 로컬 시스템에서 파일을 읽고 쓸 수 있습니다. Chromium 제한을 피하고 애플리케이션의 내부 파일에 글을 쓰려면 `electron`의 API, 특히 [`app.getPath(name)`](https://electron.atom.io/docs/api/app/#appgetpathname) 함수를 사용해야합니다. 이 도우미 메소드는 사용자의 데스크탑, 시스템 임시 파일 등과 같은 시스템 디렉토리에 대한 파일 경로를 가져올 수 있습니다.

### Use Case

애플리케이션를 위한 로컬 데이터베이스 저장소를 갖기를 원한다고 가정 해 봅시다. 이 예제에서는 [`nedb`](https://github.com/louischatriot/nedb)를 사용하여 시연합니다.

```bash
yarn add nedb # or npm install nedb --save
```

**src/renderer/datastore.js**

여기서는 NeDB를 설정하고 `userData` 디렉토리를 가리 킵니다. 이 공간은 애플리케이션을 위해 특별히 예약되어 있습니다. 그러므로 다른 프로그램이나 다른 사용자의 상호작용이 이 파일 공간을 변경해서는 안된다는 확신을 가질 수 있습니다. `renderer` 프로세스에서 `datastore.js`를 가져와서 소비 할 수 있습니다.

```js
import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'

export default new Datastore({
  autoload: true,
  filename: path.join(remote.app.getPath('userData'), '/data.db')
})
```

**src/renderer/main.js**

단계를 더 진행하기 위해, datastore를 `src/renderer/main.js`로 가져와서 Vue 프로토타입에 연결할 수 있습니다. 이렇게 하면, 모든 component 파일에서 `this.$db`를 사용하여 datastore API에 액세스 할 수 있게되었습니다.

```js
import db from './datastore'

/* Other Code */

Vue.prototype.$db = db
```





================================================
FILE: docs/ko/testing.md
================================================
# Testing

electron-vue는 `renderer` 프로세스에 대한 단위 테스팅과 end-to-end 테스트를 모두 지원하며 공식 `vuejs-templates/webpack` 보일러 플레이트에서 제공되는 테스트 설정에 크게 영향을 받습니다. 
`vue-cli` 스캐폴딩 중 테스트 지원 옵션을 선택 할 수 있습니다.

## [Unit testing](unittesting.md)

Karma + Mocha로 유닛 테스트 실행합니다.

```bash
npm run unit
```

## [End-to-end testing](end-to-end_testing.md)

Spectron + Mocha로 end-to-end 테스트 실행합니다.

```bash
npm run e2e
```

## 모든 테스트 실행

```bash
npm test
```

### CI 테스팅에 관하여

스캐폴딩 할 때 `electron-builder`를 빌드 도구로 사용하기로 결정했다면 `darwin`, `linux` 그리고 `win32` 용 Travis CI 및 AppVeyor에서 애플리케이션을 쉽게 테스트 할 수 있습니다. `.travis.yml` 와 `appveyor.yml` 둘 다 내부에서 주석 처리 된 섹션을 찾을 수 있고 곧바로 주석을 해제하여 테스트를 수행 할 수 있습니다. 자세한 내용은 [**Automated Deployments using CI**](using-electron-builder.md#automated-deployments-using-ci)를 읽으세요.



================================================
FILE: docs/ko/unittesting.md
================================================
# Unit Testing

electron-vue는 유닛 테스트를 위해 [Karma](https://karma-runner.github.io/1.0/index.html) 테스트 러너, \(Chai[Chai](http://chaijs.com/)와 함께\)[Mocha](https://mochajs.org/) 테스트 프레임워크를 사용합니다.

Mocha와 Chai는 각각 `karma-mocha`와 `karma-chai`를 사용하여 통합되므로 `expect`와 같은 모든 API는 테스트 파일 전역에서 사용할 수 있습니다.

### Running Tests

```bash
# Begin Karma
npm run unit
```

### File Structure

```
my-project
├─ test
|  ├─ unit
│  │  ├─ specs/
│  │  ├─ index.js
└─ └─ └─ karma.conf.js
```

대부분의 경우, index.js와 karma.conf.js 둘 다 무시하고 specs/ 작성에만 집중할 수 있습니다.

**대부분의 경우,** `index.js` **와** `karma.conf.js` **둘 다 무시하고** `specs/` **작성에만 집중 할 수 있습니다.**

#### `specs/`

이 디렉토리 안은 실제 테스트가 작성되는 곳이 있습니다. webpack의 힘으로 ES2015 및 지원되는 로더에 대한 모든 액세스 권한을 갖게됩니다.

#### `index.js`

`karma-webpack`에서 사용하는 엔트리 파일입니다. 이 파일의 목적은 모든 테스트 및 소스 코드를 "한 번에" 수집하는 것입니다.

#### `karma.conf.js`

여기서 spec/coverage 리포터와 함께 설정한 실제 `karma` 구성을 찾을 수 있습니다. 추가 사용자 정의는 [official karma documentation](http://karma-runner.github.io/1.0/config/configuration-file.html)를 따라 만들 수 있습니다.

### Mocking Dependencies

electron-vue는 기본적으로  [`inject-loader`](https://github.com/plasticine/inject-loader)가 설치되어 있습니다. 
Vue 컴포넌트 파일 사용법은 [`vue-loader` docs on testing with mocks](http://vue-loader.vuejs.org/en/workflow/testing-with-mocks.html)를 참조하세요.



================================================
FILE: docs/ko/using-electron-builder.md
================================================
# [`electron-builder`](https://github.com/electron-userland/electron-builder) 사용하기

`electron-builder`가 생성한 모든 빌드는 `build` 디렉토리에서 찾을 수 있습니다.

#### 빌드하기

```bash
npm run build
```

#### 압축 해제한 디렉토리 빌드하기

완전한 installer가 없는 간단한 실행 파일을 생성합니다. 빠른 테스트에 유용합니다.

```bash
npm run build:dir
```

### Default building configuration

Further customization can be made at `package.json` in accordance to `electron-builders`'s options found [here](https://github.com/electron-userland/electron-builder/wiki/Options).

```js
"build": {
  "productName": "ElectronVue",
  "appId": "org.simulatedgreg.electron-vue",
  "dmg": {
    "contents": [
      {
        "x": 410,
        "y": 150,
        "type": "link",
        "path": "/Applications"
      },
      {
        "x": 130,
        "y": 150,
        "type": "file"
      }
    ]
  },
  "directories": {
    "output": "build"
  },
  "files": [
    "dist/electron",
    "node_modules/",
    "package.json"
  ],
  "mac": {
    "icon": "build/icons/icon.icns"
  },
  "win": {
    "icon": "build/icons/icon.ico"
  },
  "linux": {
    "icon": "build/icons"
  }
}
```

## CI를 이용한 자동화 된 배치

electron-vue의 `electron-builder` 구성을 사용하면 자동화된 배치를 위해 `appveyor.yml`와 `.travis.yml`도 제공됩니다. 두 설정 파일은 electron 애플리케이션 빌드와 artifacts를 Github release, Bintray 등에 푸시하는 설정 입니다. Travis CI는 `linux`와 `darwin` \(macOS\)을 빌드하는 데 사용되는 반면 AppVeyor는 `win32`를 빌드하는 데 사용됩니다. 두 서비스 모두 OSS 프로젝트에서 무료입니다.

#### Setting up Travis CI/AppVeyor

1. [Travis CI](https://travis-ci.org/getting_started) / [AppVeyor](https://www.appveyor.com/)에서 계정을 만드세요.
2. 여러분의 electron-vue 프로젝트가 있는 Github 저장소를 링크하세요.
3. [https://github.com/settings/tokens](https://github.com/settings/tokens) 방문하고 **Generate new token **을 누르세요.\(이 토큰은 Travis CI & AppVeyor 둘 다에 사용 될 수 있습니다.\)
   1. **Token description** 설정하세요.
   2. **public\_repo **스코프를 확인하세요.
   3. **Generate token**를 누르세요.
4. 나중에 새 토큰을 복사하고 저장하세요.
5. Travis CI / AppVeyor에서 원격 저장소 설정을 열고 새로운 **Environment Variable**를 추가하세요.
   1. 변수의 이름을 `GH_TOKEN`으로 설정하세요.
   2. 변수의 값을 방금 생성한 GitHub 액세스 토큰으로 설정하세요.
   3. 새로운 변수를 **저장**하고 암호화가 사용 가능한지 확인하세요.
   
이 지점에서, 모든 것이 설정되어야 합니다. Travis CI/AppVeyor는 기본적으로 `master` 브랜치에 대한 푸시를 감시합니다. 푸시가 이루어지면 Travis CI/AppVeyor는 원격 저장소를 서버에 복제하고 빌드 프로세스를 시작합니다. 최종 단계에서 `electron-builder`는 `GH_TOKEN` 환경 변수를 보고 초안 릴리스를 만들고 공개 GitHub 저장소에 artifacts를 업로드 합니다. 이 시점에서 초안 릴리스를 편집 한 다음이를 세상에 퍼블릭 할 수 있습니다. 릴리스를 퍼블리싱 한 후, `package.json`을 업데이트하여 향후 릴리스가 새 버전 번호로 표시되는지 확인하세요.

#### 자동 업데이트

애플리케이션에서 자동 업데이트를 수신하도록 설정하는 것은 멋진 기능이지만 [**Code Signing**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing)이 필요하다는 것을 알고 있어야합니다. [여기](https://www.electron.build/code-signing)에 설명 된 `electron-builder` 요구 사항을 기반으로 몇 가지 환경 변수를 추가하여 Code Signing을 설정할 수 있습니다. 인증서를 설정하고 나면 `electron-updater` 를 설치하고 `src/main/index.js`의 하단 코드 덩어리를 주석해지하여 자동 업데이트를 활성화 할 수 있습니다.

대부분의 사람들과 같은 멋진 코드 서명 인증서가 없으면 GitHub API를 사용하여 새 릴리스를 확인할 수 있습니다. 새로운 릴리스가 발견되면 애플리케이션 내에서 새 빌드를 다운로드하고 설치할 수 있는 다운로드 페이지로 사용자를 안내하는 알림을 제공하세요.`electron-builder`가 제공하는 놀라운 설치 프로그램 덕분에 사용자는 현재 버전을 설치 제거 할 필요가 없으며 새 설치는 웹 저장소 또는 `userData` 파일을 계속 유지하면서 이전 버전을 대체합니다.



================================================
FILE: docs/ko/using-electron-packager.md
================================================
# [`electron-packager`](https://github.com/electron-userland/electron-packager) 사용하기

`electron-packager`가 생성 한 모든 빌드는 `build` 폴더에서 찾을 수 있습니다.

#### 모든 플랫폼 빌드

모든 운영체제가 다른 모든 플랫폼을 위한 빌드를 할 수있는 것은 아닙니다.

```bash
npm run build
```

#### 특정 플랫폼 빌드

플랫폼에는 `darwin`, `mas`, `linux` 및 `win32`가 포함됩니다.

```bash
# build for darwin (macOS)
npm run build:darwin
```

#### Cleaning

`build` 폴더에 있는 모든 빌드를 제거합니다.

```bash
npm run build:clean
```

### non-Windows 사용자를 위한 주의사항

non-Windows 플랫폼을 사용하여 **사용자 정의 아이콘이 있는** Windows를 위한 빌드를 하려면 [wine](https://www.winehq.org/)을 설치해야합니다. [More Info](https://github.com/electron-userland/electron-packager#building-windows-apps-from-non-windows-platforms).

### 디폴트 빌드 구성

[여기서](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options) `electron-packager`의 옵션에 찾아서 `.electron-vue/build.config.js`에 추가하여 사용자 정의를 할 수 있습니다. 빌드 애플리케이션에 적용된 이름은 `package.json`의 `productName` 값으로 설정됩니다.

```js
{
    // Target 'x64' architecture
    arch: 'x64',

    // Compress app using 'electron/asar'
    asar: true,

    // Directory of the app
    dir: path.join(__dirname, '../'),

    // Set electron app icon
    // File extensions are added based on platform
    //
    // If building for Linux, please read
    // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon
    icon: path.join(__dirname, '../build/icons/icon'),

    // Ignore files that would bloat final build size
    ignore: /(^\/(src|test|\.[a-z]+|README|yarn|static|dist\/web))|\.gitkeep/,

    // Save builds to `builds`
    out: path.join(__dirname, '../build'),

    // Overwrite existing builds
    overwrite: true,

    // Environment variable that sets platform
    platform: process.env.BUILD_TARGET || 'all'
}
```





================================================
FILE: docs/ko/using-static-assets.md
================================================
# Static Assets 사용하기

이전에 공식 `vuejs-templates/webpack` 보일러플레이트를 사용했다면, `static/` 디렉토리에 익숙해야합니다. 여기에 `main`과 `renderer` 프로세스 둘 다가 소비 할 수 있는 Static assets을 배치 할 수 있습니다. Vue 애플리케이션에서 이러한 assets을 사용하는 것은 간단하지만 전체 경로가 필요한 `fs` 및 다른 모듈을 사용하는 것은 다소 까다로울 수 있습니다. 감사하게도 electron-vue는 개발 및 프로덕션 환경에서 `static/` 디렉토리 경로를 생성하는 `__static` 변수를 제공합니다.

### Vue Components에서 'src' 태그 사용 사례

이미지를 로드하는 component가 있지만 다른 작업이 완료 될 때까지 이미지의 경로를 알 수 없다고 가정 해 보겠습니다. 작업을 단순하게 유지하기 위해 `<img>`의 src 바인드하기 위해 `data` 변수를 합시다.

**SomeComponent.vue**

```html
<template>
  <img v-bind:src="imageUrl">
</template>

<script>
  export default {
    data () {
      // notice the url starts with `static/`
      return { imageUrl: 'static/imgs/unsplash.png' }
    }
  }
</script>
```

여기서 `webpack`은 `unsplash.png` 이미지를 번들로 제공하지 않으며 애플리케이션은 해당 asset을 `static/imgs/unsplash.png` 디렉토리에서 찾습니다. `vue-loader` 덕분에 모든 더러운 작업이 완료되었습니다.

### Use Case within JS with `fs`,`path` and `__static`

`fs`를 사용하여 애플리케이션에서 읽을 static asset이 있다고 가정 해 봅시다. 근대 개발과 프로덕션 둘 다에서  `static/` 디렉토리에 대한 신뢰할 수있는 경로를 얻는 방법은 무엇입니까? electron-vue는 `static/` 디렉토리에 대한 적절한 경로를 생성하는 `__static`이라는 전역 변수를 제공합니다. 다음은
Download .txt
gitextract_mf9vvmtx/

├── .github/
│   └── ISSUE_TEMPLATE.md
├── .gitignore
├── LICENSE.md
├── README.md
├── book.json
├── docs/
│   ├── LANGS.md
│   ├── cn/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── en/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── debugging-production.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── ja/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   ├── ko/
│   │   ├── README.md
│   │   ├── SUMMARY.md
│   │   ├── book.json
│   │   ├── building_your_app.md
│   │   ├── contributing.md
│   │   ├── debugging-production.md
│   │   ├── development.md
│   │   ├── end-to-end_testing.md
│   │   ├── entry_indexhtml.md
│   │   ├── faqs.md
│   │   ├── file-tree.md
│   │   ├── getting_started.md
│   │   ├── global_configuration.md
│   │   ├── main-process.md
│   │   ├── meta.md
│   │   ├── migration-guide.md
│   │   ├── miscellaneous.md
│   │   ├── new-releases.md
│   │   ├── npm_scripts.md
│   │   ├── project_structure.md
│   │   ├── renderer-process.md
│   │   ├── savingreading-local-files.md
│   │   ├── testing.md
│   │   ├── unittesting.md
│   │   ├── using-electron-builder.md
│   │   ├── using-electron-packager.md
│   │   ├── using-static-assets.md
│   │   ├── using_css_frameworks.md
│   │   ├── using_pre-processors.md
│   │   ├── using_the_file_structure.md
│   │   ├── vue_accessories.md
│   │   └── webpack-configurations.md
│   └── pt_BR/
│       ├── README.md
│       ├── SUMMARY.md
│       ├── book.json
│       ├── building_your_app.md
│       ├── contributing.md
│       ├── development.md
│       ├── end-to-end_testing.md
│       ├── entry_indexhtml.md
│       ├── faqs.md
│       ├── file-tree.md
│       ├── getting_started.md
│       ├── global_configuration.md
│       ├── main-process.md
│       ├── meta.md
│       ├── migration-guide.md
│       ├── miscellaneous.md
│       ├── new-releases.md
│       ├── npm_scripts.md
│       ├── project_structure.md
│       ├── renderer-process.md
│       ├── savingreading-local-files.md
│       ├── testing.md
│       ├── unittesting.md
│       ├── using-electron-builder.md
│       ├── using-electron-packager.md
│       ├── using-static-assets.md
│       ├── using_css_frameworks.md
│       ├── using_pre-processors.md
│       ├── using_the_file_structure.md
│       ├── vue_accessories.md
│       └── webpack-configurations.md
├── meta.js
├── package.json
├── template/
│   ├── .babelrc
│   ├── .electron-vue/
│   │   ├── build.config.js
│   │   ├── build.js
│   │   ├── dev-client.js
│   │   ├── dev-runner.js
│   │   ├── webpack.main.config.js
│   │   ├── webpack.renderer.config.js
│   │   └── webpack.web.config.js
│   ├── .eslintignore
│   ├── .eslintrc.js
│   ├── .gitignore
│   ├── .travis.yml
│   ├── README.md
│   ├── appveyor.yml
│   ├── build/
│   │   └── icons/
│   │       └── icon.icns
│   ├── dist/
│   │   ├── electron/
│   │   │   └── .gitkeep
│   │   └── web/
│   │       └── .gitkeep
│   ├── package.json
│   ├── src/
│   │   ├── index.ejs
│   │   ├── main/
│   │   │   ├── index.dev.js
│   │   │   └── index.js
│   │   └── renderer/
│   │       ├── App.vue
│   │       ├── assets/
│   │       │   └── .gitkeep
│   │       ├── components/
│   │       │   ├── LandingPage/
│   │       │   │   └── SystemInformation.vue
│   │       │   └── LandingPage.vue
│   │       ├── main.js
│   │       ├── router/
│   │       │   └── index.js
│   │       └── store/
│   │           ├── index.js
│   │           └── modules/
│   │               ├── Counter.js
│   │               └── index.js
│   ├── static/
│   │   └── .gitkeep
│   └── test/
│       ├── .eslintrc
│       ├── e2e/
│       │   ├── index.js
│       │   ├── specs/
│       │   │   └── Launch.spec.js
│       │   └── utils.js
│       └── unit/
│           ├── index.js
│           ├── karma.conf.js
│           └── specs/
│               └── LandingPage.spec.js
└── tests/
    ├── builds/
    │   └── .gitkeep
    ├── builds.json
    ├── scaffold.js
    ├── scaffold.sh
    └── wine.sh
Download .txt
SYMBOL INDEX (28 symbols across 9 files)

FILE: meta.js
  function getCurrentSHA (line 7) | function getCurrentSHA (author) {
  function appendSHALink (line 38) | function appendSHALink (sha, destDirName) {
  method isEnabled (line 141) | isEnabled (list, check, opts) {
  method deps (line 145) | deps (plugins) {
  method testing (line 164) | testing (unit, e2e, opts) {
  method complete (line 184) | complete (data) {

FILE: template/.electron-vue/build.js
  function clean (line 30) | function clean () {
  function build (line 36) | async function build () {
  function pack (line 94) | function pack (config) {
  function bundleApp (line 123) | function bundleApp () {
  function web (line 136) | function web () {
  function greeting (line 151) | function greeting () {

FILE: template/.electron-vue/dev-runner.js
  function logStats (line 19) | function logStats (proc, data) {
  function startRenderer (line 41) | function startRenderer () {
  function startMain (line 81) | function startMain () {
  function startElectron (line 117) | function startElectron () {
  function electronLog (line 144) | function electronLog (data, color) {
  function greeting (line 161) | function greeting () {
  function init (line 179) | function init () {

FILE: template/.electron-vue/webpack.renderer.config.js
  method templateParameters (line 132) | templateParameters(compilation, assets, options) {

FILE: template/.electron-vue/webpack.web.config.js
  method templateParameters (line 104) | templateParameters(compilation, assets, options) {

FILE: template/src/main/index.js
  function createWindow (line 23) | function createWindow () {

FILE: template/src/renderer/store/modules/Counter.js
  method INCREMENT_MAIN_COUNTER (line 9) | INCREMENT_MAIN_COUNTER (state) {

FILE: template/test/e2e/utils.js
  method afterEach (line 5) | afterEach () {
  method beforeEach (line 12) | beforeEach () {

FILE: tests/scaffold.js
  constant YELLOW (line 9) | const YELLOW = '\x1b[33m'
  constant END (line 10) | const END = '\x1b[0m'
  function generate (line 20) | function generate (key, build) {
Condensed preview — 208 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (326K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 655,
    "preview": "#### Found an issue or bug with electron-vue? Tell me all about it!\nQuestions regarding how to use `electron` or `vue` a"
  },
  {
    "path": ".gitignore",
    "chars": 100,
    "preview": ".idea\n_book\nthumbs.db\n.DS_Store\nnode_modules\ntests/builds/*\nnpm-debug.log\nnpm-debug.*.log\n!.gitkeep\n"
  },
  {
    "path": "LICENSE.md",
    "chars": 1079,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Greg Holguin\n\nPermission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "README.md",
    "chars": 9565,
    "preview": "<div align=\"center\">\n<br>\n<img width=\"500\" src=\"/docs/images/logo.png\" alt=\"electron-vue\">\n<br>\n<br>\n</div>\n\n<p align=\"c"
  },
  {
    "path": "book.json",
    "chars": 553,
    "preview": "{\n  \"root\": \"./docs\",\n  \"plugins\": [\n    \"edit-link\",\n    \"theme-vuejs@git+https://github.com/pearofducks/gitbook-plugin"
  },
  {
    "path": "docs/LANGS.md",
    "chars": 78,
    "preview": "* [English](en/)\n* [日本語](ja/)\n* [中文](cn/)\n* [대한민국](ko/)\n* [Português](pt_BR/)\n"
  },
  {
    "path": "docs/cn/README.md",
    "chars": 4384,
    "preview": "![](../images/logo.png)\n\n> 基于 vue (基本上是它听起来的样子) 来构造 electron 应用程序的样板代码。\n\n[![Build Status](https://semaphoreci.com/api/v1"
  },
  {
    "path": "docs/cn/SUMMARY.md",
    "chars": 842,
    "preview": "# 概要\n\n* [简介](./README.md)\n* [起步](getting_started.md)\n* [项目结构](project_structure.md)\n  * [文件树](file-tree.md)\n  * [渲染器进程]("
  },
  {
    "path": "docs/cn/book.json",
    "chars": 17,
    "preview": "{\n  \"root\": \"\"\n}\n"
  },
  {
    "path": "docs/cn/building_your_app.md",
    "chars": 599,
    "preview": "# 构建你的应用程序\n\nelectron-vue 支持使用 [electron-packager](https://github.com/electron-userland/electron-packager) 和 [electron-bu"
  },
  {
    "path": "docs/cn/contributing.md",
    "chars": 264,
    "preview": "# 贡献\n\n想要贡献你的力量?随时提交 pull 请求。在准备提交任何内容之前,请务必查看以下内容...\n\n### JavaScript 标准规范\n\n为确保所有 JS 代码遵循基本的 ***风格标准***,请务必遵循这些 [规则](http"
  },
  {
    "path": "docs/cn/development.md",
    "chars": 202,
    "preview": "# 开发\n\n### 开始开发环境设置\n\n在你使用 `yarn` 或 `npm install` 安装了依赖之后, 运行...\n\n```bash\nyarn run dev # 或者 npm run dev\n```\n\n...然后 轰! 现在,你"
  },
  {
    "path": "docs/cn/end-to-end_testing.md",
    "chars": 1305,
    "preview": "# 端对端测试\n\n对于端到端测试,electron-vue 使用 [Spectron](http://electron.atom.io/spectron/) 和 测试框架 [Mocha](https://mochajs.org/) \\(以及"
  },
  {
    "path": "docs/cn/entry_indexhtml.md",
    "chars": 1216,
    "preview": "# 入口 `index.html`\n\n在产品阶段,electron-vue 使用 [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-plugi"
  },
  {
    "path": "docs/cn/faqs.md",
    "chars": 2011,
    "preview": "# 常见问题\n\n* [为什么运行 `npm run dev` 之后我的 electron 应用程序是空白的?](#why-is-my-electron-app-blank-after-running-npm-run-dev)\n* [为什么我"
  },
  {
    "path": "docs/cn/file-tree.md",
    "chars": 886,
    "preview": "# 文件树\n\n### 在开发过程中\n\n**注意**: 某些文件或文件夹可能会根据在 `vue-cli` 脚手架中所选设置的不同而有所不同。\n\n```\nmy-project\n├─ .electron-vue\n│  └─ <build/deve"
  },
  {
    "path": "docs/cn/getting_started.md",
    "chars": 1230,
    "preview": "# 起步\n\n## 脚手架\n\n该样板代码被构建为 [`vue-cli`](https://github.com/vuejs/vue-cli) 的一个模板,并且包含多个选项,可以自定义你最终的脚手架程序。本项目需要使用 `node@^7` 或更"
  },
  {
    "path": "docs/cn/global_configuration.md",
    "chars": 1162,
    "preview": "# Global Configuration\n\nelectron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre"
  },
  {
    "path": "docs/cn/main-process.md",
    "chars": 970,
    "preview": "# 主进程\n\n> 在 Electron 中,运行 package.json 主脚本的过程称为主进程 (main process)。在主进程中运行的脚本可以通过创建网页来显示其图形化界面。\n\n**摘自** [**Electron 文档**]("
  },
  {
    "path": "docs/cn/meta.md",
    "chars": 473,
    "preview": "# 更多\n\n### 感谢\n\n哇,非常感谢你们的帮助,使得 electron-vue 在 GitHub 上成为(我可以找到的)前 3 名 `vue-cli` 模板之一。我从来没有想过这个项目会像今天一样脱颖而出。回想过去,我起初(在 **20"
  },
  {
    "path": "docs/cn/migration-guide.md",
    "chars": 486,
    "preview": "# 迁移指南\n\n本文档尝试解释 _应该_ 如何实现你的项目迁移,但是由于整体项目结构始终可能变化,因此,这可能不是一个完整验证过的方法。\n\n1. 使用 `vue init simulatedgreg/electron-vue my-proj"
  },
  {
    "path": "docs/cn/miscellaneous.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/cn/new-releases.md",
    "chars": 898,
    "preview": "# 新版本\n\nelectron-vue 自 2016年5月初 创建以来有了很大的发展,并引入了许多新奇的功能。你能相信有一段时间该项目还不支持 `vue-cli` 脚手架吗?新功能的开发计划不会停止。唯一的缺点是,每天都有华而不实的东西存在"
  },
  {
    "path": "docs/cn/npm_scripts.md",
    "chars": 873,
    "preview": "# NPM 脚本\n\n为了帮助你消除开发过程中的冗余任务,请注意一些可用的 NPM 脚本。以下命令应该运行在项目的根目录下。当然,你可以使用 `yarn run <command>` 的方式运行下列任何命令。\n\n### `npm run bu"
  },
  {
    "path": "docs/cn/project_structure.md",
    "chars": 1104,
    "preview": "# 项目结构\n\n当涉及制作 electron 应用程序的问题时,项目结构会有些不同。如果你以前使用过官方的 [`vuejs-templates/webpack`](https://github.com/vuejs-templates/web"
  },
  {
    "path": "docs/cn/renderer-process.md",
    "chars": 1780,
    "preview": "# 渲染器进程\n\n> 由于 Electron 使用 Chromium 显示网页,那么,Chromium 的多进程架构也被使用。Electron 中的每个网页都在自己的进程中运行,称为渲染器进程 (renderer process)。\n>\n>"
  },
  {
    "path": "docs/cn/savingreading-local-files.md",
    "chars": 1006,
    "preview": "# 读写本地文件\n\n使用 `electron` 的一大好处是可以访问用户的文件系统。这使你可以读取和写入本地系统上的文件。为了避免 Chromium 的限制以及对应用程序内部文件的改写,请确保使用 `electron` 的 API,特别是 "
  },
  {
    "path": "docs/cn/testing.md",
    "chars": 610,
    "preview": "# 测试\n\n因受到了官方样板代码 `vuejs-templates/webpack` 提供的测试功能的极大启发,electron-vue 同时支持单元测试和 `renderer` 进程的端到端测试。在 `vue-cli` 脚手架中,你可以选"
  },
  {
    "path": "docs/cn/unittesting.md",
    "chars": 1027,
    "preview": "# 单元测试\n\n对于进行单元测试,electron-vue 使用 [Karma](https://karma-runner.github.io/1.0/index.html) 作为测试的运行器,使用 [Mocha](https://moch"
  },
  {
    "path": "docs/cn/using-electron-builder.md",
    "chars": 2683,
    "preview": "# [`electron-builder`](https://github.com/electron-userland/electron-builder) 的使用\n\n所有 `electron-builder` 生成的文件都可以在 `buil"
  },
  {
    "path": "docs/cn/using-electron-packager.md",
    "chars": 1492,
    "preview": "# [`electron-packager`](https://github.com/electron-userland/electron-packager) 的使用\n\n所有 `electron-packager` 生成的文件都可以在 `b"
  },
  {
    "path": "docs/cn/using-static-assets.md",
    "chars": 1641,
    "preview": "# 静态资源的使用\n\n如果你以前使用过官方的 `vuejs-templates/webpack` 样板,那么你应该对 `static/` 目录很熟悉。这里面,你可以放置可供 `main` 和 `renderer` 进程使用的静态资源。在 V"
  },
  {
    "path": "docs/cn/using_css_frameworks.md",
    "chars": 669,
    "preview": "# CSS 框架的使用\n\n虽然这可能看起来并不明智,但我建议你使用 [`style-loader`](https://github.com/webpack/style-loader) 将第三方 CSS 库导入 webpack,其实这一点我们"
  },
  {
    "path": "docs/cn/using_pre-processors.md",
    "chars": 1730,
    "preview": "# 预处理器的使用\n\n将 [`vue-loader`](https://github.com/vuejs/vue-loader) 与 [`webpack`](https://github.com/webpack/webpack) 一起使用的"
  },
  {
    "path": "docs/cn/using_the_file_structure.md",
    "chars": 314,
    "preview": "# Using the File Structure\n\nelectron-vue 尽可能不强制一个特别的项目结构,但是努力去跟随通用 Vue & Electron 的实践。以下文档描述了在元项目结构中使用的通用实践。\n\n**如果你对 Ele"
  },
  {
    "path": "docs/cn/vue_accessories.md",
    "chars": 1211,
    "preview": "# Vue 插件\n\nelectron-vue 包含以下 `vue` 插件,可以使用 `vue-cli` 脚手架安装...\n\n* [axios](https://github.com/mzabriskie/axios)\\(网络请求\\)\n* ["
  },
  {
    "path": "docs/cn/webpack-configurations.md",
    "chars": 878,
    "preview": "# Webpack 配置\n\nelectron-vue 包含三个单独的、位于 `.electron-vue/` 目录中的 webpack 配置文件。除了可选的使用 `web` 输出以外,`main` 和 `renderer` 在安装过程中都是"
  },
  {
    "path": "docs/en/README.md",
    "chars": 6062,
    "preview": "![](../images/logo.png)\n\n> The boilerplate for making electron applications built with vue \\(pretty much what it sounds "
  },
  {
    "path": "docs/en/SUMMARY.md",
    "chars": 1112,
    "preview": "# Summary\n\n* [Introduction](./README.md)\n* [Getting Started](getting_started.md)\n* [Project Structure](project_structure"
  },
  {
    "path": "docs/en/book.json",
    "chars": 17,
    "preview": "{\n  \"root\": \"\"\n}\n"
  },
  {
    "path": "docs/en/building_your_app.md",
    "chars": 941,
    "preview": "# Building Your App\n\nelectron-vue supports both [electron-packager](https://github.com/electron-userland/electron-packag"
  },
  {
    "path": "docs/en/contributing.md",
    "chars": 437,
    "preview": "# Contributing\nWanting to help with this boilerplate? Feel free to submit a pull request. Before getting ready to submit"
  },
  {
    "path": "docs/en/debugging-production.md",
    "chars": 1982,
    "preview": "# Debugging\n\n### Main Process\n\nWhen running your application in development you may have noticed a message from the `mai"
  },
  {
    "path": "docs/en/development.md",
    "chars": 350,
    "preview": "# Development\n\n### Starting the development setup\n\nAfter you have installed dependencies with `yarn` or `npm install`, t"
  },
  {
    "path": "docs/en/end-to-end_testing.md",
    "chars": 1986,
    "preview": "# End-to-End Testing\n\nelectron-vue makes use of [Spectron](http://electron.atom.io/spectron/) and the [Mocha](https://mo"
  },
  {
    "path": "docs/en/entry_indexhtml.md",
    "chars": 1931,
    "preview": "# Entry `index.html`\n\nelectron-vue makes use of [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpac"
  },
  {
    "path": "docs/en/faqs.md",
    "chars": 3086,
    "preview": "# FAQs\n\n* [Why is my electron app blank after running `npm run dev`?](#why-is-my-electron-app-blank-after-running-npm-ru"
  },
  {
    "path": "docs/en/file-tree.md",
    "chars": 1123,
    "preview": "# File Tree\n\n### During development\n\n**Note**: Some files/folders may differ based on the settings chosen during `vue-cl"
  },
  {
    "path": "docs/en/getting_started.md",
    "chars": 2187,
    "preview": "# Getting Started\n\n## Scaffolding\n\nThis boilerplate was built as a template for [vue-cli](https://github.com/vuejs/vue-c"
  },
  {
    "path": "docs/en/global_configuration.md",
    "chars": 1162,
    "preview": "# Global Configuration\n\nelectron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre"
  },
  {
    "path": "docs/en/main-process.md",
    "chars": 1653,
    "preview": "# Main Process\n\n> In Electron, the process that runs package.json’s main script is called the main process. The script t"
  },
  {
    "path": "docs/en/meta.md",
    "chars": 1153,
    "preview": "# Meta\n\n### Thank You\n\nWow, thank you guys so much for helping make electron-vue one of the top 3`vue-cli`templates \\(th"
  },
  {
    "path": "docs/en/migration-guide.md",
    "chars": 1094,
    "preview": "# Migration Guide\n\nThe following documentation attempts to explain how migrating your project _should_ be accomplished, "
  },
  {
    "path": "docs/en/miscellaneous.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/en/new-releases.md",
    "chars": 1638,
    "preview": "# New Releases\n\nelectron-vue has evolved greatly since its initial creation in May of 2016 and has introduced many new f"
  },
  {
    "path": "docs/en/npm_scripts.md",
    "chars": 1531,
    "preview": "# NPM Scripts\n\nTo help eliminate redundant tasks around the development process, please take note of some of the NPM scr"
  },
  {
    "path": "docs/en/project_structure.md",
    "chars": 1993,
    "preview": "# Project Structure\n\nWhen it comes to making electron apps, project structure is a little different. If you have used th"
  },
  {
    "path": "docs/en/renderer-process.md",
    "chars": 3207,
    "preview": "# Renderer Process\n\n> Since Electron uses Chromium for displaying web pages, Chromium’s multi-process architecture is al"
  },
  {
    "path": "docs/en/savingreading-local-files.md",
    "chars": 2272,
    "preview": "# Read & Write Local Files\n\nOne great benefit of using `electron` is the ability to access the user's file system. This "
  },
  {
    "path": "docs/en/testing.md",
    "chars": 1045,
    "preview": "# Testing\n\nelectron-vue supports both unit testing and end-to-end testing for the `renderer` process and is heavily insp"
  },
  {
    "path": "docs/en/unittesting.md",
    "chars": 1536,
    "preview": "# Unit Testing\n\nelectron-vue makes use of the [Karma](https://karma-runner.github.io/1.0/index.html) test runner and the"
  },
  {
    "path": "docs/en/using-electron-builder.md",
    "chars": 4181,
    "preview": "# Using [`electron-builder`](https://github.com/electron-userland/electron-builder)\n\nAll builds produced by `electron-bu"
  },
  {
    "path": "docs/en/using-electron-packager.md",
    "chars": 2039,
    "preview": "# Using [`electron-packager`](https://github.com/electron-userland/electron-packager)\n\nAll builds produced by `electron-"
  },
  {
    "path": "docs/en/using-static-assets.md",
    "chars": 2907,
    "preview": "# Using Static Assets\n\nIf you have used the official `vuejs-templates/webpack` boilerplate before, then you should be fa"
  },
  {
    "path": "docs/en/using_css_frameworks.md",
    "chars": 1042,
    "preview": "# Using CSS Frameworks\n\nAlthough this may seem like a no brainer, I'd suggest you import your third-party CSS libraries "
  },
  {
    "path": "docs/en/using_pre-processors.md",
    "chars": 2881,
    "preview": "# Using Pre-Processors\n\nOne of the great benefits of using [`vue-loader`](https://github.com/vuejs/vue-loader) with [`we"
  },
  {
    "path": "docs/en/using_the_file_structure.md",
    "chars": 586,
    "preview": "# Using the File Structure\n\nelectron-vue does its best to not force a particular project structure, but does try to foll"
  },
  {
    "path": "docs/en/vue_accessories.md",
    "chars": 3098,
    "preview": "# Vue Plugins\n\nelectron-vue comes packed with the following `vue` plugins that can be installed during `vue-cli` scaffol"
  },
  {
    "path": "docs/en/webpack-configurations.md",
    "chars": 1679,
    "preview": "# Webpack Configurations\n\nelectron-vue comes packed with three separate webpack config files located in the `.electron-v"
  },
  {
    "path": "docs/ja/README.md",
    "chars": 4827,
    "preview": "![](../images/logo.png)\n\n> vue で構築された electron アプリケーションを作成するためのボイラープレートです(名前から分かるように)。\n\n[![Build Status](https://semapho"
  },
  {
    "path": "docs/ja/SUMMARY.md",
    "chars": 942,
    "preview": "# 概要\n\n- [導入](./README.md)\n- [はじめに](getting_started.md)\n- [プロジェクト構造](project_structure.md)\n    - [ファイルツリー](file-tree.md)\n"
  },
  {
    "path": "docs/ja/book.json",
    "chars": 17,
    "preview": "{\n  \"root\": \"\"\n}\n"
  },
  {
    "path": "docs/ja/building_your_app.md",
    "chars": 684,
    "preview": "# アプリケーション構築\n\nelectron-vue はビルドと本番アプリケーションの配布のために [electron-packager](https://github.com/electron-userland/electron-pack"
  },
  {
    "path": "docs/ja/contributing.md",
    "chars": 317,
    "preview": "# 貢献\n\nこのボイラープレートを手助けしたいですか?遠慮なくプルリクエストを送信してください。何かを送信する準備をする前に、以下をチェックしてください...\n\n### JavaScript 標準スタイル\n\n全ての JS が***標準スタイ"
  },
  {
    "path": "docs/ja/development.md",
    "chars": 238,
    "preview": "# 開発\n\n### 開発セットアップ\n\n`yarn` または `npm install` で依存関係をインストールした後、実行します...\n\n```bash\nyarn run dev # or npm run dev\n```\n\n...そして"
  },
  {
    "path": "docs/ja/end-to-end_testing.md",
    "chars": 1461,
    "preview": "# エンドツーエンドテスト\n\nelectron-vue はエンドツーエンドテストのために [Spectron](http://electron.atom.io/spectron/) とテストフレームワークの [Mocha](https://"
  },
  {
    "path": "docs/ja/entry_indexhtml.md",
    "chars": 1393,
    "preview": "#  `index.html`\n\nelectron-vue は本番ビルドで `index.html` を作成するために [**`html-webpack-plugin`**](https://github.com/ampedandwired"
  },
  {
    "path": "docs/ja/faqs.md",
    "chars": 2337,
    "preview": "# FAQ\n\n- [`npm run dev` を実行した後に electron アプリケーションが空白になるのはなぜですか?](#why-is-my-electron-app-blank-after-running-npm-run-dev"
  },
  {
    "path": "docs/ja/file-tree.md",
    "chars": 940,
    "preview": "# ファイルツリー\n\n### 開発中\n\n**注**: 一部のファイル/フォルダは `vue-cli` スキャフォールディングで選択した設定に応じて異なる場合があります。\n\n```\nmy-project\n├─ .electron-vue\n│ "
  },
  {
    "path": "docs/ja/getting_started.md",
    "chars": 1539,
    "preview": "# はじめに\n\n## スキャフォールディング\n\nこのボイラープレートは [vue-cli](https://github.com/vuejs/vue-cli) のテンプレートとして作成され、スキャフォールディングされたアプリケーションをカス"
  },
  {
    "path": "docs/ja/global_configuration.md",
    "chars": 1160,
    "preview": "# Global Configuration\n\nelectron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre"
  },
  {
    "path": "docs/ja/main-process.md",
    "chars": 1132,
    "preview": "# メインプロセス\n\n> Electron では、package.json のメインスクリプトを実行するプロセスをメインプロセスと呼びます。メインプロセスで実行されるスクリプトは、Web ページを作成して GUI を表示できます。\n\n[**"
  },
  {
    "path": "docs/ja/meta.md",
    "chars": 621,
    "preview": "# メタ\n\n### ありがとうございます\n\nわあ、electron-vue を GitHub で(見つけることができる)トップ3の `vue-cli` テンプレートのうちの1つにするのを手伝ってくれてありがとうございます。このプロジェクトが"
  },
  {
    "path": "docs/ja/migration-guide.md",
    "chars": 638,
    "preview": "# 移行ガイド\n\n以下のドキュメントでは、プロジェクトが移行をどのように達成*すべき*であるか説明しますが、プロジェクト全体の構造が常に変更されているため、完全な方法ではない可能性があります。\n\n1. `vue init simulated"
  },
  {
    "path": "docs/ja/miscellaneous.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/ja/new-releases.md",
    "chars": 1020,
    "preview": "# 新しいリリース\n\nelectron-vue は2016年5月に作成して以来、大きく進化し、多くの新しく素晴らしい機能を導入してきました。`vue-cli` のスキャフォールディングが提供されていない時があったことを信じられますか?新しい"
  },
  {
    "path": "docs/ja/npm_scripts.md",
    "chars": 1056,
    "preview": "# NPM スクリプト\n\n開発プロセスに関する冗長なタスクを排除するために、役立つ NPM スクリプトに注目してください。次のコマンドは、プロジェクトのルートディレクトリから実行する必要があります。そしてもちろん、以下のコマンドのどれでも "
  },
  {
    "path": "docs/ja/project_structure.md",
    "chars": 1345,
    "preview": "# プロジェクト構造\n\nelectron アプリケーションの作成に関しては、プロジェクト構造は少し変わっています。これまで公式の [`vuejs-templates/webpack`](https://github.com/vuejs-te"
  },
  {
    "path": "docs/ja/renderer-process.md",
    "chars": 2206,
    "preview": "# レンダラープロセス\n\n> Electron は web ページの表示に Chromium を使用するので、 Chromium の マルチプロセスアーキテクチャも使われています。Electron では web ページごとにレンダラープロセ"
  },
  {
    "path": "docs/ja/savingreading-local-files.md",
    "chars": 1172,
    "preview": "# ローカルファイルの読み書き\n\n`electron` を使用する利点の一つは、ユーザーのファイルシステムにアクセスできることです。これにより、ローカルシステム上のファイルを読み書きすることができます。Chromium の制限を回避し、アプ"
  },
  {
    "path": "docs/ja/testing.md",
    "chars": 742,
    "preview": "# テスト\n\nelectron-vue は `renderer` プロセスのユニットテストとエンドツーエンドテストの両方をサポートし、公式の `vuejs-templates/webpack` ボイラープレートで提供されているテスト設定に大"
  },
  {
    "path": "docs/ja/unittesting.md",
    "chars": 1160,
    "preview": "# ユニットテスト\n\nelectron-vue はユニットテストのためにテストランナーの [Karma](https://karma-runner.github.io/1.0/index.html) とテストフレームワークの [Mocha]"
  },
  {
    "path": "docs/ja/using-electron-builder.md",
    "chars": 3038,
    "preview": "# [`electron-builder`](https://github.com/electron-userland/electron-builder)の使用 \n\n`electron-builder` によって作成された全てのビルドは `"
  },
  {
    "path": "docs/ja/using-electron-packager.md",
    "chars": 1704,
    "preview": "# [`electron-packager`](https://github.com/electron-userland/electron-packager) の使用\n\n`electron-packager` によって作成された全てのビルド"
  },
  {
    "path": "docs/ja/using-static-assets.md",
    "chars": 1920,
    "preview": "# 静的アセットの使用\n\nもし以前に `vuejs-templates/webpack` ボイラープレートを使用したことがある場合、 `static/` ディレクトリに詳しいでしょう。ここは `main` プロセスや `renderer` "
  },
  {
    "path": "docs/ja/using_css_frameworks.md",
    "chars": 720,
    "preview": "# CSS フレームワークの使用\n\nこれは簡単なように思えるかもしれませんが、すでに用意されている [`style-loader`](https://github.com/webpack/style-loader) を使用してサードパーティ"
  },
  {
    "path": "docs/ja/using_pre-processors.md",
    "chars": 1915,
    "preview": "# プリプロセッサの使用\n\n[`webpack`](https://github.com/webpack/webpack) で [`vue-loader`](https://github.com/vuejs/vue-loader) を使用す"
  },
  {
    "path": "docs/ja/using_the_file_structure.md",
    "chars": 583,
    "preview": "# Using the File Structure\n\nelectron-vue does its best to not force a particular project structure, but does try to foll"
  },
  {
    "path": "docs/ja/vue_accessories.md",
    "chars": 1483,
    "preview": "# Vue プラグイン\n\nelectron-vue には `vue-cli` でのスキャフォールディングの間にインストールできる次の `vue` プラグインが入っています...\n\n- [axios ](https://github.com/"
  },
  {
    "path": "docs/ja/webpack-configurations.md",
    "chars": 1099,
    "preview": "# Webpack構成\n\nelectron-vue には `.electron-vue/` ディレクトリに置かれた3つの別々の webpack 設定ファイルが入っています。 `web` 出力のオプションは別として、 `main` と `re"
  },
  {
    "path": "docs/ko/README.md",
    "chars": 7009,
    "preview": "![](../images/logo.png)\n\n> vue로 구축 된 electron 애플리케이션을 만들기 위한 보일러 플레이트\n\n[![Build Status](https://semaphoreci.com/api/v1/s"
  },
  {
    "path": "docs/ko/SUMMARY.md",
    "chars": 1112,
    "preview": "# Summary\n\n* [Introduction](./README.md)\n* [Getting Started](getting_started.md)\n* [Project Structure](project_structure"
  },
  {
    "path": "docs/ko/book.json",
    "chars": 17,
    "preview": "{\n  \"root\": \"\"\n}\n"
  },
  {
    "path": "docs/ko/building_your_app.md",
    "chars": 678,
    "preview": "# 앱 빌드하기\n\nelectron-vue는 프로덕션 준비가 완료된 애플리케이션을 빌드 및 배포 할 수 있는 [electron-packager](https://github.com/electron-userland/ele"
  },
  {
    "path": "docs/ko/contributing.md",
    "chars": 325,
    "preview": "# Contributing\n이 보일러플레이트를 돕고 싶나요? 자유롭게 pull request를 제출하세요. 제출 준비를 하기 전에 다음을 확인하세요...\n\n### JavaScript 표준 스타일\n모든 JS가 기본 *"
  },
  {
    "path": "docs/ko/debugging-production.md",
    "chars": 1430,
    "preview": "# Debugging\n\n### Main Process\n\n개발 중인 애플리케이션을 실행할 때, 여러분은 원격 디버거를 언급하는 `main` 프로세스에서 메시지를 발견했을 수도 있습니다. `electron@^1.7.2`"
  },
  {
    "path": "docs/ko/development.md",
    "chars": 253,
    "preview": "# Development\n\n### 개발 설정 시작하기\n\n`yarn` 또는 `npm install`을 사용하여 종속성을 설치 한 후, 실행합니다.\n\n```bash\nyarn run dev # or npm run dev\n"
  },
  {
    "path": "docs/ko/end-to-end_testing.md",
    "chars": 1986,
    "preview": "# End-to-End Testing\n\nelectron-vue makes use of [Spectron](http://electron.atom.io/spectron/) and the [Mocha](https://mo"
  },
  {
    "path": "docs/ko/entry_indexhtml.md",
    "chars": 1409,
    "preview": "# Entry `index.html`\n\nelectron-vue는 프로덕션 빌드 중 [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-webpack-"
  },
  {
    "path": "docs/ko/faqs.md",
    "chars": 3086,
    "preview": "# FAQs\n\n* [Why is my electron app blank after running `npm run dev`?](#why-is-my-electron-app-blank-after-running-npm-ru"
  },
  {
    "path": "docs/ko/file-tree.md",
    "chars": 952,
    "preview": "# 파일 트리\n\n### 개발 파일 트리\n\n**Note**: 일부 파일,폴더는 `vue-cli` 스캐폴딩 중 선택한 설정에 따라 다를 수 있습니다..\n\n```\nmy-project\n├─ .electron-vue\n│  └"
  },
  {
    "path": "docs/ko/getting_started.md",
    "chars": 1519,
    "preview": "# 시작하기\n\n## 스캐폴딩\n\n이 보일러플레이트는 [vue-cli](https://github.com/vuejs/vue-cli) 템플릿으로 제작되었으며 최종 스캐폴드 된 애플리케이션을 사용자 정의 하는 옵션을 포함합"
  },
  {
    "path": "docs/ko/global_configuration.md",
    "chars": 1162,
    "preview": "# Global Configuration\n\nelectron-vue uses the [webpack](https://github.com/webpack/webpack) module loader system for pre"
  },
  {
    "path": "docs/ko/main-process.md",
    "chars": 1137,
    "preview": "# Main Process\n\n> Electron에서 package.json의 main 스크립트를 실행하는 프로세스를 main 프로세스라고 합니다. main 프로세스에서 실행되는 스크립트는 웹 페이지를 생성하여 GUI"
  },
  {
    "path": "docs/ko/meta.md",
    "chars": 1153,
    "preview": "# Meta\n\n### Thank You\n\nWow, thank you guys so much for helping make electron-vue one of the top 3`vue-cli`templates \\(th"
  },
  {
    "path": "docs/ko/migration-guide.md",
    "chars": 1094,
    "preview": "# Migration Guide\n\nThe following documentation attempts to explain how migrating your project _should_ be accomplished, "
  },
  {
    "path": "docs/ko/miscellaneous.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/ko/new-releases.md",
    "chars": 1638,
    "preview": "# New Releases\n\nelectron-vue has evolved greatly since its initial creation in May of 2016 and has introduced many new f"
  },
  {
    "path": "docs/ko/npm_scripts.md",
    "chars": 1095,
    "preview": "# NPM Scripts\n\n개발 프로세스에 대한 중복 작업을 제거하려면, 사용 가능한 NPM 스크립트 중 일부를 기록해 두세요. 다음 명령은 프로젝트의 루트 디렉토리에서 실행해야합니다. `yarn run <comma"
  },
  {
    "path": "docs/ko/project_structure.md",
    "chars": 1396,
    "preview": "# 프로젝트 구조\n\nelectron-vue 프로젝트 구조는 Electron App을 만들 때와  조금 다릅니다. 이전에 공식 [`vuejs-templates/webpack`](https://github.com/vue"
  },
  {
    "path": "docs/ko/renderer-process.md",
    "chars": 2217,
    "preview": "# Renderer Process\n\n> Electron는 웹 페이지를 표시하는 데 Chromium을 사용하므로 Chromium의 다중 프로세스 아키텍처도 사용됩니다. Electron의 각 웹 페이지는 렌더러 프로세스"
  },
  {
    "path": "docs/ko/savingreading-local-files.md",
    "chars": 1224,
    "preview": "# Read & Write Local Files\n\n`electron` 사용의 큰 이점 중 하나는 사용자의 파일 시스템에 액세스 할 수 있다는 것 입니다. 여러분은 로컬 시스템에서 파일을 읽고 쓸 수 있습니다. Chr"
  },
  {
    "path": "docs/ko/testing.md",
    "chars": 774,
    "preview": "# Testing\n\nelectron-vue는 `renderer` 프로세스에 대한 단위 테스팅과 end-to-end 테스트를 모두 지원하며 공식 `vuejs-templates/webpack` 보일러 플레이트에서 제공되"
  },
  {
    "path": "docs/ko/unittesting.md",
    "chars": 1280,
    "preview": "# Unit Testing\n\nelectron-vue는 유닛 테스트를 위해 [Karma](https://karma-runner.github.io/1.0/index.html) 테스트 러너, \\(Chai[Chai](htt"
  },
  {
    "path": "docs/ko/using-electron-builder.md",
    "chars": 3101,
    "preview": "# [`electron-builder`](https://github.com/electron-userland/electron-builder) 사용하기\n\n`electron-builder`가 생성한 모든 빌드는 `buil"
  },
  {
    "path": "docs/ko/using-electron-packager.md",
    "chars": 1771,
    "preview": "# [`electron-packager`](https://github.com/electron-userland/electron-packager) 사용하기\n\n`electron-packager`가 생성 한 모든 빌드는 `"
  },
  {
    "path": "docs/ko/using-static-assets.md",
    "chars": 2047,
    "preview": "# Static Assets 사용하기\n\n이전에 공식 `vuejs-templates/webpack` 보일러플레이트를 사용했다면, `static/` 디렉토리에 익숙해야합니다. 여기에 `main`과 `renderer` 프"
  },
  {
    "path": "docs/ko/using_css_frameworks.md",
    "chars": 759,
    "preview": "# Using CSS Frameworks\n\n생각할 필요가 없는 것처럼 보일지 모르지만, 이미 설치되어있는 [`style-loader`](https://github.com/webpack/style-loader)를 사용"
  },
  {
    "path": "docs/ko/using_pre-processors.md",
    "chars": 1976,
    "preview": "# 전처리기 사용하기\n\n[`webpack`](https://github.com/webpack/webpack)과 함께 [`vue-loader`](https://github.com/vuejs/vue-loader)를 사용"
  },
  {
    "path": "docs/ko/using_the_file_structure.md",
    "chars": 586,
    "preview": "# Using the File Structure\n\nelectron-vue does its best to not force a particular project structure, but does try to foll"
  },
  {
    "path": "docs/ko/vue_accessories.md",
    "chars": 1773,
    "preview": "# Vue Plugins\n\n\nelectron-vue에는 `vue-cli`의 스캐폴딩 중 설치 할 수 있는 다음의 `vue` 플러그인이 포함되어 있습니다.\n\n* [axios ](https://github.com/mza"
  },
  {
    "path": "docs/ko/webpack-configurations.md",
    "chars": 1140,
    "preview": "# Webpack Configurations\n\nelectron-vue에는 `.electron-vue/` 디렉토리에 위치한 별도의 webpack 설정 파일이 세개가 있습니다. `web` 출력의 선택적 사용을 제외하고,"
  },
  {
    "path": "docs/pt_BR/README.md",
    "chars": 6126,
    "preview": "![](../images/logo.png)\n\n> Um template para criar aplicações electron usando vue \\(como o nome diz\\).\n\n[![Build Status]("
  },
  {
    "path": "docs/pt_BR/SUMMARY.md",
    "chars": 1201,
    "preview": "# Sumário\r\n\r\n* [Introdução](./README.md)\r\n* [Início \"Rápido\"](getting_started.md)\r\n* [Estrutura de Projeto](project_stru"
  },
  {
    "path": "docs/pt_BR/book.json",
    "chars": 20,
    "preview": "{\r\n  \"root\": \"\"\r\n}\r\n"
  },
  {
    "path": "docs/pt_BR/building_your_app.md",
    "chars": 1003,
    "preview": "# Construindo seu App\r\n\r\nelectron-vue dá suporte aos dois [electron-packager](https://github.com/electron-userland/elect"
  },
  {
    "path": "docs/pt_BR/contributing.md",
    "chars": 474,
    "preview": "# Contribuindo\r\nGostaria de ajudar nesse template ? Sinta-se livre para enviar um pull request. Antes de enviar qualquer"
  },
  {
    "path": "docs/pt_BR/development.md",
    "chars": 382,
    "preview": "# Desenvolvimento\r\n\r\n### Configurando ambiente de desenvolvimento\r\n\r\nDepois de instalar dependências com `yarn` ou `npm "
  },
  {
    "path": "docs/pt_BR/end-to-end_testing.md",
    "chars": 2662,
    "preview": "# Teste End-to-End\r\n\r\nO electron-vue utiliza o [Spectron](http://electron.atom.io/spectron/) o [Mocha](https://mochajs.o"
  },
  {
    "path": "docs/pt_BR/entry_indexhtml.md",
    "chars": 1968,
    "preview": "# `index.html` de entrada\n\nelectron-vue se utiliza do [**`html-webpack-plugin`**](https://github.com/ampedandwired/html-"
  },
  {
    "path": "docs/pt_BR/faqs.md",
    "chars": 5252,
    "preview": "# FAQs\n## Perguntas frequentes...\n\n* [Por que meu app em electron esta branco sem nada depois de rodar `npm run dev` ?]("
  },
  {
    "path": "docs/pt_BR/file-tree.md",
    "chars": 1238,
    "preview": "# Árvore de Arquivos\n\n### Durante desenvolvimento\n\n**Nota**: Alguns arquivos/pastas podem estar diferentes das configura"
  },
  {
    "path": "docs/pt_BR/getting_started.md",
    "chars": 2423,
    "preview": "# Começando Agora\n\n## Scaffolding\n### Quais ferramentas usamos para montar esse projeto/template.\n\nEsse template é const"
  },
  {
    "path": "docs/pt_BR/global_configuration.md",
    "chars": 1158,
    "preview": "# Configuração Global\n\nelectron-vue usa o [webpack](https://github.com/webpack/webpack) module loader system for pre-pro"
  },
  {
    "path": "docs/pt_BR/main-process.md",
    "chars": 1776,
    "preview": "# Main Process\n\n> No Electron, o processo que roda o package.json's script primario e chamado pelo processo principal. O"
  },
  {
    "path": "docs/pt_BR/meta.md",
    "chars": 1250,
    "preview": "# Meta\n\n### Obrigado\n\nWow, muito obrigado a vocês pessoal por ajudar a fazer o electron-vue uma das top 3 `vue-cli`templ"
  },
  {
    "path": "docs/pt_BR/migration-guide.md",
    "chars": 1112,
    "preview": "# Guia de migração\n\nA documentação a seguir tenta explicar a migração do seu projeto deve ser realizada. Esse método não"
  },
  {
    "path": "docs/pt_BR/miscellaneous.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/pt_BR/new-releases.md",
    "chars": 1889,
    "preview": "# Novas versões\n\nelectron-vue has evolved greatly since its initial creation in May of 2016 and has introduced many new "
  },
  {
    "path": "docs/pt_BR/npm_scripts.md",
    "chars": 1426,
    "preview": "# NPM Scripts\n\nTo help eliminate redundant tasks around the development process, please take note of some of the NPM scr"
  },
  {
    "path": "docs/pt_BR/project_structure.md",
    "chars": 1993,
    "preview": "# Project Structure\n\nWhen it comes to making electron apps, project structure is a little different. If you have used th"
  },
  {
    "path": "docs/pt_BR/renderer-process.md",
    "chars": 3216,
    "preview": "# Processo de Renderização\n\n> Since Electron uses Chromium for displaying web pages, Chromium’s multi-process architectu"
  },
  {
    "path": "docs/pt_BR/savingreading-local-files.md",
    "chars": 1665,
    "preview": "# Read & Write Local Files\n\nOne great benefit of using `electron` is the ability to access the user's file system. This "
  },
  {
    "path": "docs/pt_BR/testing.md",
    "chars": 1045,
    "preview": "# Testing\n\nelectron-vue supports both unit testing and end-to-end testing for the `renderer` process and is heavily insp"
  },
  {
    "path": "docs/pt_BR/unittesting.md",
    "chars": 1536,
    "preview": "# Unit Testing\n\nelectron-vue makes use of the [Karma](https://karma-runner.github.io/1.0/index.html) test runner and the"
  },
  {
    "path": "docs/pt_BR/using-electron-builder.md",
    "chars": 4213,
    "preview": "# Using [`electron-builder`](https://github.com/electron-userland/electron-builder)\n\nAll builds produced by `electron-bu"
  },
  {
    "path": "docs/pt_BR/using-electron-packager.md",
    "chars": 2039,
    "preview": "# Using [`electron-packager`](https://github.com/electron-userland/electron-packager)\n\nAll builds produced by `electron-"
  },
  {
    "path": "docs/pt_BR/using-static-assets.md",
    "chars": 2907,
    "preview": "# Using Static Assets\n\nIf you have used the official `vuejs-templates/webpack` boilerplate before, then you should be fa"
  },
  {
    "path": "docs/pt_BR/using_css_frameworks.md",
    "chars": 1042,
    "preview": "# Using CSS Frameworks\n\nAlthough this may seem like a no brainer, I'd suggest you import your third-party CSS libraries "
  },
  {
    "path": "docs/pt_BR/using_pre-processors.md",
    "chars": 2558,
    "preview": "# Using Pre-Processors\n\nOne of the great benefits of using [`vue-loader`](https://github.com/vuejs/vue-loader) with [`we"
  },
  {
    "path": "docs/pt_BR/using_the_file_structure.md",
    "chars": 586,
    "preview": "# Using the File Structure\n\nelectron-vue does its best to not force a particular project structure, but does try to foll"
  },
  {
    "path": "docs/pt_BR/vue_accessories.md",
    "chars": 2038,
    "preview": "# Vue Plugins\n\nelectron-vue comes packed with the following `vue` plugins that can be installed during `vue-cli` scaffol"
  },
  {
    "path": "docs/pt_BR/webpack-configurations.md",
    "chars": 1823,
    "preview": "# Configurações do Webpack\n\nelectron-vue vem com três arquivos de configuração do webpack separados, todos localizados n"
  },
  {
    "path": "meta.js",
    "chars": 5648,
    "preview": "'use strict'\n\nconst { join } = require('path')\nconst { readFileSync, writeFileSync } = require('fs')\nconst { get } = req"
  },
  {
    "path": "package.json",
    "chars": 714,
    "preview": "{\n  \"name\": \"electron-vue\",\n  \"version\": \"0.0.0\",\n  \"description\": \"An Electron & Vue.js quick start boilerplate with vu"
  },
  {
    "path": "template/.babelrc",
    "chars": 652,
    "preview": "{\n  \"comments\": false,\n  \"env\": {\n{{#testing unit e2e}}\n    \"test\": {\n      \"presets\": [\n        [\"env\", {\n          \"ta"
  },
  {
    "path": "template/.electron-vue/build.config.js",
    "chars": 481,
    "preview": "const path = require('path')\n\n/**\n * `electron-packager` options\n * https://simulatedgreg.gitbooks.io/electron-vue/conte"
  },
  {
    "path": "template/.electron-vue/build.js",
    "chars": 3950,
    "preview": "'use strict'\n\nprocess.env.NODE_ENV = 'production'\n\nconst { say } = require('cfonts')\nconst chalk = require('chalk')\ncons"
  },
  {
    "path": "template/.electron-vue/dev-client.js",
    "chars": 1205,
    "preview": "const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')\n\nhotClient.subscribe(event => {\n  /**"
  },
  {
    "path": "template/.electron-vue/dev-runner.js",
    "chars": 4630,
    "preview": "'use strict'\n\nconst chalk = require('chalk')\nconst electron = require('electron')\nconst path = require('path')\nconst { s"
  },
  {
    "path": "template/.electron-vue/webpack.main.config.js",
    "chars": 1769,
    "preview": "'use strict'\n\nprocess.env.BABEL_ENV = 'main'\n\nconst path = require('path')\nconst { dependencies } = require('../package."
  },
  {
    "path": "template/.electron-vue/webpack.renderer.config.js",
    "chars": 5331,
    "preview": "'use strict'\n\nprocess.env.BABEL_ENV = 'renderer'\n\nconst path = require('path')\nconst { dependencies } = require('../pack"
  },
  {
    "path": "template/.electron-vue/webpack.web.config.js",
    "chars": 4081,
    "preview": "'use strict'\n\nprocess.env.BABEL_ENV = 'web'\n\nconst path = require('path')\nconst webpack = require('webpack')\n\nconst Mini"
  },
  {
    "path": "template/.eslintignore",
    "chars": 86,
    "preview": "{{#testing unit e2e}}\ntest/unit/coverage/**\ntest/unit/*.js\ntest/e2e/*.js\n{{/testing}}\n"
  },
  {
    "path": "template/.eslintrc.js",
    "chars": 917,
    "preview": "module.exports = {\n  root: true,\n  parser: 'babel-eslint',\n  parserOptions: {\n    sourceType: 'module'\n  },\n  env: {\n   "
  },
  {
    "path": "template/.gitignore",
    "chars": 152,
    "preview": ".DS_Store\ndist/electron/*\ndist/web/*\nbuild/*\n!build/icons\n{{#if unit}}\ncoverage\n{{/if}}\nnode_modules/\nnpm-debug.log\nnpm-"
  },
  {
    "path": "template/.travis.yml",
    "chars": 1296,
    "preview": "{{#testing unit e2e}}\n# Commented sections below can be used to run tests on the CI server\n# https://simulatedgreg.gitbo"
  },
  {
    "path": "template/README.md",
    "chars": 723,
    "preview": "# {{ name }}\n\n> {{ description }}\n\n#### Build Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reloa"
  },
  {
    "path": "template/appveyor.yml",
    "chars": 671,
    "preview": "{{#testing unit e2e}}\n# Commented sections below can be used to run tests on the CI server\n# https://simulatedgreg.gitbo"
  },
  {
    "path": "template/dist/electron/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "template/dist/web/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "template/package.json",
    "chars": 5222,
    "preview": "{\n  \"name\": \"{{ name }}\",\n{{#if_eq builder 'packager'}}\n  \"productName\": \"{{ name }}\",\n{{/if_eq}}\n  \"version\": \"{{ appve"
  },
  {
    "path": "template/src/index.ejs",
    "chars": 789,
    "preview": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <title>{{ name }}</title>\n    <% if (htmlWebpackPlugin.op"
  },
  {
    "path": "template/src/main/index.dev.js",
    "chars": 715,
    "preview": "/**\n * This file is used specifically and only for development. It installs\n * `electron-debug` & `vue-devtools`. There "
  },
  {
    "path": "template/src/main/index.js",
    "chars": 1764,
    "preview": "{{#if_eq eslintConfig 'standard'}}\n'use strict'\n\n{{/if_eq}}\nimport { app, BrowserWindow } from 'electron'{{#if_eq eslint"
  },
  {
    "path": "template/src/renderer/App.vue",
    "chars": 557,
    "preview": "<template>\n  <div id=\"app\">\n    {{#isEnabled plugins 'vue-router'}}\n    <router-view></router-view>\n    {{else}}\n    <la"
  },
  {
    "path": "template/src/renderer/assets/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "template/src/renderer/components/LandingPage/SystemInformation.vue",
    "chars": 1746,
    "preview": "<template>\n  <div>\n    <div class=\"title\">Information</div>\n    <div class=\"items\">\n{{#isEnabled plugins 'vue-router'}}\n"
  },
  {
    "path": "template/src/renderer/components/LandingPage.vue",
    "chars": 2840,
    "preview": "<template>\n  <div id=\"wrapper\">\n    <img id=\"logo\" src=\"~@/assets/logo.png\" alt=\"electron-vue\">\n    <main>\n      <div cl"
  },
  {
    "path": "template/src/renderer/main.js",
    "chars": 727,
    "preview": "import Vue from 'vue'\n{{#isEnabled plugins 'axios'}}\nimport axios from 'axios'\n{{/isEnabled}}\n\nimport App from './App'\n{"
  },
  {
    "path": "template/src/renderer/router/index.js",
    "chars": 287,
    "preview": "import Vue from 'vue'\nimport Router from 'vue-router'\n\nVue.use(Router)\n\nexport default new Router({\n  routes: [\n    {\n  "
  },
  {
    "path": "template/src/renderer/store/index.js",
    "chars": 452,
    "preview": "import Vue from 'vue'\nimport Vuex from 'vuex'\n\n{{#isEnabled plugins 'vuex-electron'}}\nimport { createPersistedState, cre"
  },
  {
    "path": "template/src/renderer/store/modules/Counter.js",
    "chars": 489,
    "preview": "const state = {\n  main: 0\n}\n\nconst mutations = {\n  DECREMENT_MAIN_COUNTER (state) {\n    {{#if_eq eslintConfig 'airbnb'}}"
  },
  {
    "path": "template/src/renderer/store/modules/index.js",
    "chars": 377,
    "preview": "/**\n * The file enables `@/store/index.js` to import all vuex modules\n * in a one-shot manner. There should not be any r"
  },
  {
    "path": "template/static/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "template/test/.eslintrc",
    "chars": 271,
    "preview": "{\n  \"env\": {\n    \"mocha\": true\n  },\n  \"globals\": {\n    \"assert\": true,\n    \"expect\": true,\n    \"should\": true,\n    \"__st"
  },
  {
    "path": "template/test/e2e/index.js",
    "chars": 434,
    "preview": "'use strict'\n\n// Set BABEL_ENV to use proper env config\nprocess.env.BABEL_ENV = 'test'\n\n// Enable use of ES6+ on require"
  },
  {
    "path": "template/test/e2e/specs/Launch.spec.js",
    "chars": 304,
    "preview": "import utils from '../utils'\n\ndescribe('Launch', function () {\n  beforeEach(utils.beforeEach)\n  afterEach(utils.afterEac"
  },
  {
    "path": "template/test/e2e/utils.js",
    "chars": 445,
    "preview": "import electron from 'electron'\nimport { Application } from 'spectron'\n\nexport default {\n  afterEach () {\n    this.timeo"
  },
  {
    "path": "template/test/unit/index.js",
    "chars": 523,
    "preview": "import Vue from 'vue'\nVue.config.devtools = false\nVue.config.productionTip = false\n\n// require all test files (files tha"
  }
]

// ... and 8 more files (download for full content)

About this extraction

This page contains the full source code of the SimulatedGREG/electron-vue GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 208 files (296.7 KB), approximately 99.5k tokens, and a symbol index with 28 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!