Explorar o código

更新说明。

oldj %!s(int64=9) %!d(string=hai) anos
pai
achega
d28faa5dc6
Modificáronse 2 ficheiros con 47 adicións e 49 borrados
  1. 46 48
      README.md
  2. 1 1
      app/gulpfile.js

+ 46 - 48
README.md

@@ -24,9 +24,53 @@ Homepage: [https://oldj.github.io/SwitchHosts/](https://oldj.github.io/SwitchHos
 
 ## 文件备份
 
-### Mac 用户
+SwitchHosts! 的数据文件在 `~/.SwitchHosts` 目录下(Windows 用户为个人主目录下的 `.SwitchHosts` 目录下),其中 `~/.SwitchHosts/data.json` 是 hosts 数据文件,`~/.SwitchHosts/prefereces.json` 是配置信息。
 
-SwitchHosts! 的数据文件在 `~/.SwitchHosts` 目录下,其中 `~/.SwitchHosts/data.json` 是 hosts 数据文件,`~/.SwitchHosts/prefereces.json` 是配置信息。
+
+## 运行/打包方法
+
+### 环境配置
+
+ - 安装 [node.js](https://nodejs.org/) 环境;
+ - 在 `./app` 目录下,运行 `npm install` 命令,安装依赖库。
+
+ ```bash
+ cd app
+ npm install
+ ```
+
+### 构建及运行
+
+ - 在 `./app` 目录下,运行 `npm run build` 命令,构建所需文件;
+ - 在 `./app` 目录下,运行 `npm start` 命令,即可运行程序。
+
+ ```bash
+ cd app
+
+ # build
+ npm run build
+
+ # start
+ npm start
+
+ # start in developer mode
+ npm run dev
+ ```
+
+### 打包发布
+
+ - 在 `./app` 目录下,运行 `npm run pack` 命令,打包后的文件位于 `./app/dist` 目录
+ - 更多信息请参考 [Electron 文档](http://electron.atom.io/docs/)。
+
+ ```bash
+ cd app
+
+ # pack
+ npm run pack  # the packed files will be in ./app/dist
+
+ # zip
+ gulp zip  # the zipped files will be in ./app/dist
+ ```
 
 ## 更新历史:
 
@@ -67,52 +111,6 @@ SwitchHosts! 的数据文件在 `~/.SwitchHosts` 目录下,其中 `~/.SwitchHo
  - 2011-09-02 发布 0.1.0 版,完成基本功能。
 
 
-
-## 运行/打包方法
-
-### 环境配置
-
- - 安装 [node.js](https://nodejs.org/) 环境;
- - 在 `./app` 目录下,运行 `npm install` 命令,安装依赖库。
-
- ```bash
- cd app
- npm install
- ```
-
-### 构建及运行
-
- - 在 `./app` 目录下,运行 `npm run build` 命令,构建所需文件;
- - 在 `./app` 目录下,运行 `npm start` 命令,即可运行程序。
-
- ```bash
- cd app
-
- # build
- npm run build
-
- # start
- npm start
-
- # start in developer mode
- npm run dev
- ```
-
-### 打包发布
-
- - 在 `./app` 目录下,运行 `npm run pack` 命令,打包后的文件位于 `./app/dist` 目录
- - 更多信息请参考 [Electron 文档](http://electron.atom.io/docs/)。
-
-```bash
-cd app
-
-# pack
-npm run pack  # the packed files will be in ./app/dist
-
-# zip
-gulp zip  # the zipped files will be in ./app/dist
-```
-
 ## 版权
 
 本程序完全免费,并基于 MIT 协议开源。

+ 1 - 1
app/gulpfile.js

@@ -63,7 +63,7 @@ gulp.task('zip', () => {
 cd ./dist
 rm -f ./SwitchHosts-*.zip
 zip -ry SwitchHosts-macOS-x64_v${v}.zip ./SwitchHosts\\!-darwin-x64/SwitchHosts\\!.app
-zip -ry SwitchHosts-win32-x64_${v}.zip ./SwitchHosts\\!-win32-x64
+zip -ry SwitchHosts-win32-x64_v${v}.zip ./SwitchHosts\\!-win32-x64
 cd ..
 `;