10
10
## 開發
11
11
12
12
我們使用 Webpack HMR 來開發 Boostnote。
13
-
14
13
在專案根目錄底下執行下列指令,將會以原始設置啟動 Boostnote。
15
14
16
15
** 用 yarn 來安裝必要 packages**
19
18
$ yarn
20
19
```
21
20
22
- ** 開始開發 **
21
+ ** 編譯及執行 **
23
22
24
23
```
25
24
$ yarn run dev
26
25
```
27
26
28
- > ### Notice
27
+ > ### 注意
29
28
>
30
- > There are some cases where you have to refresh the app manually.
29
+ > 以下是一些可能要手動重新啟動程式的情況。
31
30
>
32
- > 1 . When editing a constructor method of a component
33
- > 2 . When adding a new css class (similar to 1: the CSS class is re-written by each component. This process occurs at the Constructor method.)
31
+ > 1 . 修改一個 component 的 constructor 方法時。
32
+ > 2 . 新增新的 CSS 類別時 (和 1 很類似: CSS 類別會被每個 component 重寫過。這個過程在 constructor 方法中發生)。
34
33
35
- ## Deploy
34
+ ## 使用 Pull Requests 中的程式碼
35
+ 瀏覽 pull request 的頁面,從 URL 的後面找到 PR 號碼。
36
36
37
- We use Grunt to automate deployment.
38
- You can build the program by using ` grunt ` . However, we don't recommend this because the default task includes codesign and authenticode.
37
+ <pre >
38
+ https://github.com/BoostIO/Boostnote/pull/2794
39
+ </pre >
40
+ 接著,於底下步驟中把 \< PR> 換成這個號碼 (沒有括號)。
41
+ 請將上面的 URL 中的 \< PR> 換置成 2794。
39
42
40
- So, we've prepared a separate script which just makes an executable file.
43
+ _ 如果您還未取得一份 master branch 的本地備份_
44
+ ```
45
+ git clone https://github.com/BoostIO/Boostnote.git
46
+ cd Boostnote
47
+ git fetch origin pull/<PR>/head:<PR>
48
+ git checkout <PR>
49
+ ```
50
+
51
+ _ 如果您已經擁有了 master branch_
52
+ ```
53
+ git fetch origin pull/<PR>/head:<PR>
54
+ git checkout <PR>
55
+ ```
56
+
57
+ _ 編譯及執行程式碼_
58
+ ```
59
+ yarn
60
+ yarn run dev
61
+ ```
62
+
63
+ ## 佈署
64
+
65
+ 我們用 Grunt 做自動佈署。
66
+ 您能使用 ` grung ` 建構本程式。然而,我們並不建議這麼做,因為預設工作流程包含了程式簽名以及 Authenticode 驗證。
67
+
68
+ 所以,我們準備了一份額外的腳本用於建構可執行檔。
41
69
42
70
```
43
71
grunt pre-build
44
72
```
45
73
46
- You will find the executable in the ` dist ` directory. Note, the auto updater won't work because the app isn't signed.
74
+ 您可以在 ` dist ` 資料夾下找到可執行檔。注意,自動更新功能 ( auto updater) 並不會生效,因為程式沒有被簽署過。
47
75
48
- If you find it necessary, you can use codesign or authenticode with this executable.
76
+ 必要時您可以使用程式簽名或 authenticode 驗證執行檔。
49
77
50
- ## Make own distribution packages (deb, rpm)
78
+ ## 建立您自己的發行版套件 (deb, rpm)
51
79
52
- Distribution packages are created by exec ` grunt build ` on Linux platform (e.g. Ubuntu, Fedora).
80
+ 發行版套件可以透過在 Linux 平台上 (如 Ubuntu, Fedora) 執行 ` grunt build ` 來建立。
53
81
54
- > Note: You can create both ` .deb ` and ` .rpm ` in a single environment.
82
+ > 注意:您可以在同個環境中同時建立 ` .deb ` 及 ` .rpm ` 。
55
83
56
- After installing the supported version of ` node ` and ` npm ` , install build dependency packages.
84
+ 安裝支援版本的 ` node ` 和 ` npm ` 後,安裝編譯相依套件。
57
85
58
86
Ubuntu/Debian:
59
87
@@ -67,10 +95,10 @@ Fedora:
67
95
$ sudo dnf install -y dpkg dpkg-dev rpm-build fakeroot
68
96
```
69
97
70
- Then execute ` grunt build ` .
98
+ 接著執行 ` grunt build ` 。
71
99
72
100
```
73
101
$ grunt build
74
102
```
75
103
76
- You will find ` .deb ` and ` .rpm ` in the ` dist ` directory.
104
+ 於 ` dist ` 資料夾下找到 ` .deb ` 及 ` .rpm ` 。
0 commit comments