Skip to content

Commit fb0f236

Browse files
author
github-actions
committed
auto: style(docs): Fix h2 header
SourceCommit: emacs-eask/cli@f7d5a7d
1 parent 6e9ee4b commit fb0f236

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

fonts/GeekdocIcons.woff

0 Bytes
Binary file not shown.

fonts/GeekdocIcons.woff2

-4 Bytes
Binary file not shown.

zh-tw/Contributing/Developing-Eask/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
<label><span class=flex><svg class="gdoc-icon gdoc_github"><use xlink:href="#gdoc_github"/></svg>
4848
<a href=https://github.com/emacs-eask/cli class=gdoc-nav__entry>View Source</a></span></label></li></ul></section></nav></aside><div class=gdoc-page><div class="gdoc-page__header flex flex-wrap
4949
justify-between" itemprop=breadcrumb><div><svg class="gdoc-icon gdoc_path hidden-mobile"><use xlink:href="#gdoc_path"/></svg><ol class=breadcrumb itemscope itemtype=https://schema.org/BreadcrumbList><li itemprop=itemListElement itemscope itemtype=https://schema.org/ListItem><a itemscope itemtype=https://schema.org/WebPage itemprop=item itemid=/zh-tw/ href=/zh-tw/><span itemprop=name></span></a><meta itemprop=position content='2'></li><li>/</li><li itemprop=itemListElement itemscope itemtype=https://schema.org/ListItem><a itemscope itemtype=https://schema.org/WebPage itemprop=item itemid=/zh-tw/Contributing/ href=/zh-tw/Contributing/><span itemprop=name>貢獻</span></a><meta itemprop=position content='3'></li><li>/</li><li itemprop=itemListElement itemscope itemtype=https://schema.org/ListItem><span itemprop=name>🔨 開發 Eask</span><meta itemprop=position content='4'></li></ol></div><div><span class=editpage><svg class="gdoc-icon gdoc_code"><use xlink:href="#gdoc_code"/></svg>
50-
<a href=https://github.com/emacs-eask/cli//edit/master/docs/content/Contributing/Developing-Eask/_index.zh-tw.md>Edit page</a></span></div></div><article class="gdoc-markdown gdoc-markdown__align--left" id=main-content tabindex=-1><h1>🔨 開發 Eask</h1><div class="gdoc-toc gdoc-toc__level--3"><nav id=TableOfContents><ul><li><ul><li><a href=#-必備條件>🚩 必備條件</a></li><li><a href=#-建構>📝 建構</a></li><li><a href=#-測試>🧪 測試</a></li><li><a href=#-執行測試>⚗️ 執行測試</a></li><li><a href=#-環境變數>🌍 環境變數</a></li><li><a href=#-如何撰寫測試>🔬 如何撰寫測試</a></li><li><a href=#-快照>🪧 快照</a></li><li><a href=#-超時>⏱️ 超時</a></li><li><a href=#-樣式>📜 樣式</a></li><li><a href=#-常見問題>🩺 常見問題</a></li></ul></li></ul></nav><hr></div><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-必備條件>🚩 必備條件</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-必備條件 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🚩 必備條件" aria-label="Anchor to: 🚩 必備條件" href=#-%e5%bf%85%e5%82%99%e6%a2%9d%e4%bb%b6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>要更改 Eask,您應該:</p><ol><li><a class=gdoc-markdown__link href=https://nodejs.org/en/>Node.js</a> 開發環境。</li><li><a class=gdoc-markdown__link href=https://www.npmjs.com/>npm</a> 包管理器。</li><li><a class=gdoc-markdown__link href=https://www.gnu.org/software/emacs/>Emacs</a>, 26.1 以上!</li></ol><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-建構>📝 建構</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-建構 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 📝 建構" aria-label="Anchor to: 📝 建構" href=#-%e5%bb%ba%e6%a7%8b><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>要構建開發環境,您必須使用安裝 Eask <a class=gdoc-markdown__link href=https://emacs-eask.github.io/zh-tw/Getting-Started/Install-Eask/#-%e5%be%9e%e5%8e%9f%e5%a7%8b%e7%a2%bc%e6%a7%8b%e5%bb%ba>從源代碼建構</a>
50+
<a href=https://github.com/emacs-eask/cli//edit/master/docs/content/Contributing/Developing-Eask/_index.zh-tw.md>Edit page</a></span></div></div><article class="gdoc-markdown gdoc-markdown__align--left" id=main-content tabindex=-1><h1>🔨 開發 Eask</h1><div class="gdoc-toc gdoc-toc__level--3"><nav id=TableOfContents><ul><li><a href=#-必備條件>🚩 必備條件</a></li><li><a href=#-建構>📝 建構</a></li><li><a href=#-測試>🧪 測試</a><ul><li><a href=#-執行測試>⚗️ 執行測試</a></li><li><a href=#-環境變數>🌍 環境變數</a></li><li><a href=#-如何撰寫測試>🔬 如何撰寫測試</a></li><li><a href=#-快照>🪧 快照</a></li><li><a href=#-超時>⏱️ 超時</a></li><li><a href=#-樣式>📜 樣式</a></li><li><a href=#-常見問題>🩺 常見問題</a></li></ul></li></ul></nav><hr></div><div class="flex align-center gdoc-page__anchorwrap"><h2 id=-必備條件>🚩 必備條件</h2><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-必備條件 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🚩 必備條件" aria-label="Anchor to: 🚩 必備條件" href=#-%e5%bf%85%e5%82%99%e6%a2%9d%e4%bb%b6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>要更改 Eask,您應該:</p><ol><li><a class=gdoc-markdown__link href=https://nodejs.org/en/>Node.js</a> 開發環境。</li><li><a class=gdoc-markdown__link href=https://www.npmjs.com/>npm</a> 包管理器。</li><li><a class=gdoc-markdown__link href=https://www.gnu.org/software/emacs/>Emacs</a>, 26.1 以上!</li></ol><div class="flex align-center gdoc-page__anchorwrap"><h2 id=-建構>📝 建構</h2><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-建構 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 📝 建構" aria-label="Anchor to: 📝 建構" href=#-%e5%bb%ba%e6%a7%8b><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>要構建開發環境,您必須使用安裝 Eask <a class=gdoc-markdown__link href=https://emacs-eask.github.io/zh-tw/Getting-Started/Install-Eask/#-%e5%be%9e%e5%8e%9f%e5%a7%8b%e7%a2%bc%e6%a7%8b%e5%bb%ba>從源代碼建構</a>
5151
的方法。 確保你已經設置了環境 <code>PATH</code> 變量,這樣你就可以調用來自終端的<code>eask</code></p><p>完成安裝後,嘗試:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-sh data-lang=sh><span class=line><span class=cl>eask locate
52-
</span></span></code></pre></div><p>它應該會列印出 <code>eask</code> 可執行檔的位置。即使您已安裝多個 Eask 版本,也應該可以辨識 Eask 可執行檔的位置!</p><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-測試>🧪 測試</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-測試 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🧪 測試" aria-label="Anchor to: 🧪 測試" href=#-%e6%b8%ac%e8%a9%a6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>Eask 的本地測試使用 <a class=gdoc-markdown__link href=https://jestjs.io>Jest</a> 測試框架完成。Jest 是用 Javascript 寫成的成熟且支援良好的測試框架。
52+
</span></span></code></pre></div><p>它應該會列印出 <code>eask</code> 可執行檔的位置。即使您已安裝多個 Eask 版本,也應該可以辨識 Eask 可執行檔的位置!</p><div class="flex align-center gdoc-page__anchorwrap"><h2 id=-測試>🧪 測試</h2><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-測試 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🧪 測試" aria-label="Anchor to: 🧪 測試" href=#-%e6%b8%ac%e8%a9%a6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>Eask 的本地測試使用 <a class=gdoc-markdown__link href=https://jestjs.io>Jest</a> 測試框架完成。Jest 是用 Javascript 寫成的成熟且支援良好的測試框架。
5353
選擇 Jest 的原因與本專案<a class=gdoc-markdown__link href=https://emacs-eask.github.io/zh-tw/FAQ/#-%E7%82%BA%E4%BB%80%E9%BA%BC%E9%81%B8%E6%93%87-javascript>選擇 Javascript 的原因大致相同</a>。此外,Jest 容易學習,而且內建了對快照測試的支援。</p><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-執行測試>⚗️ 執行測試</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-執行測試 class="gdoc-page__anchor clip flex align-center" title="Anchor to: ⚗️ 執行測試" aria-label="Anchor to: ⚗️ 執行測試" href=#-%e5%9f%b7%e8%a1%8c%e6%b8%ac%e8%a9%a6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p>如果尚未執行,請執行 <code>npm install --dev</code></p><p>永遠從專案根目錄執行 (即與 <code>package.json</code> 相同的目錄)</p><ul><li>執行所有測試 <code>npm run test</code></li><li>執行單次測試 <code>npm run test path/to/test.js</code></li><li>以完整輸出執行測試 <code>npm run test-debug</code></li><li>移除測試時建立的檔案 <code>npm run test-reset</code></li></ul><p>由於 <code>npm run test</code> 只會執行 Jest,您也可以將 Jest 選項傳給上面的指令。例如</p><ul><li>執行名稱 (在 <code>test()</code> 區塊中) 符合<code>npm run test -t 'eask lint .*'</code> 的測試</li><li>重新執行失敗的測試 <code>npm run test -f</code></li></ul><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-環境變數>🌍 環境變數</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-環境變數 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🌍 環境變數" aria-label="Anchor to: 🌍 環境變數" href=#-%e7%92%b0%e5%a2%83%e8%ae%8a%e6%95%b8><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><div class=table-wrap><table><thead><tr><th style=text-align:left>Name</th><th style=text-align:left>Type</th><th style=text-align:left>Default</th><th style=text-align:left>Meaning</th></tr></thead><tbody><tr><td style=text-align:left><code>ALLOW_UNSAFE</code></td><td style=text-align:left><code>bool*</code></td><td style=text-align:left>false</td><td style=text-align:left><code>testUnsafe</code> 區塊中執行測試。這些區塊可能<strong>覆寫</strong>您個人的 emacs 配置或設定。</td></tr><tr><td style=text-align:left><code>DEBUG</code></td><td style=text-align:left><code>bool*</code></td><td style=text-align:left>false</td><td style=text-align:left>列印測試中指令的完整輸出。</td></tr><tr><td style=text-align:left><code>EASK_COMMAND</code></td><td style=text-align:left>path</td><td style=text-align:left>&ldquo;eask&rdquo;</td><td style=text-align:left>Eask 的路徑。通常是 <code>eask</code><code>$PWD/bin/eask</code> 來使用本機變更。</td></tr><tr><td style=text-align:left><code>TIMEOUT</code></td><td style=text-align:left>number</td><td style=text-align:left>25000</td><td style=text-align:left>命令超時,以毫秒為單位。請注意這與 Jest 的逾時時間不同,Jest 的逾時時間應該更長。</td></tr></tbody></table></div><blockquote class="gdoc-hint note"><div class="gdoc-hint__title flex gap-8 align-center"><i class="fa note"></i>
5454
<span>Note</span></div><div class=gdoc-hint__text>💡 Node.js 將環境變數當成字串來處理。這表示 <code>DEBUG=0</code><code>DEBUG=false</code><em>enable</em> <code>DEBUG</code>
5555
唯一禁用布林旗標的設定是 null,例如 <code>DEBUG=</code></div></blockquote><div class="flex align-center gdoc-page__anchorwrap"><h3 id=-如何撰寫測試>🔬 如何撰寫測試</h3><a data-clipboard-text=https://emacs-eask.github.io/zh-tw/Contributing/Developing-Eask/#-如何撰寫測試 class="gdoc-page__anchor clip flex align-center" title="Anchor to: 🔬 如何撰寫測試" aria-label="Anchor to: 🔬 如何撰寫測試" href=#-%e5%a6%82%e4%bd%95%e6%92%b0%e5%af%ab%e6%b8%ac%e8%a9%a6><svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"/></svg></a></div><p><strong>資料夾結構</strong></p><p>測試應該放在 <code>test/js</code> 中。

0 commit comments

Comments
 (0)