Try   HackMD

離線狀態使用類似 PageSpeed insight 的 Chrome 單機版工具 lighthouse

官方介紹 切到英文網頁會比較多說明

https://developers.google.com/web/tools/lighthouse

基本的檢測用指令

lighthouse https://airhorner.com/

需要登入的網頁怎麼跑

https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#testing-on-a-site-with-authentication

1.先執行以下指令打開chrome debug模式 (可不輸入網址,打開chrome時另外輸入也行)
chrome-debug https://airhorner.com/

2.此時會跳出一個chrome視窗,且command prompt會有一個port號碼 (EX:48000)  

3.操作chrome網頁進行登入

4.開啟新的command prompt (舊的不能關閉)

5.執行以下指令  (port號碼為第一個prompt視窗的號碼)
lighthouse https://airhorner.com/ --port 48000

中文化

https://github.com/GoogleChrome/lighthouse/tree/master/lighthouse-core/lib/i18n

想要用程式執行怎麼跑

https://github.com/GoogleChrome/lighthouse/tree/master/docs#using-programmatically

下載及離線安裝 Google Chrome

https://support.google.com/chrome/answer/95346?co=GENIE.Platform%3DDesktop&hl=zh-Hant

前端工程研究:如何在企業內部使用「完全離線」的方式安裝 npm 套件

https://blog.miniasp.com/post/2018/06/16/Offline-installation-of-npm-packages-for-Enterprise

報表變更語言

lighthouse https://airhorner.com/ --locale zh-TW

查看npm package安裝位置

npm config get prefix
tags: js 程式設計