2.1.1 • Published 4 years ago

pf2-customer-web-frontend-react v2.1.1

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
4 years ago

Webpack react project

§ Library

注意:此專案需與 customer-web-frontend-ember 專案共同執行(yarn start)

此專案包括以下函式庫:

專案編譯環境

專案編譯

專案語言規範:

專案主框架

專案第三方函式庫

單元測試框架

詳細函式庫列表參考 doc/packages

§ Install project library

yarn //本專案建議使用 yarn 取代 npm
或
npm install

§ Execute project command

※ 注意,使用 npm、yarn 在命令參數寫法會有所不同。 主要差別在自訂參數時,參數名稱是否加上 "--",對 npm 系統會自動將 --xxx 轉成 npm_config_xxx 變數,但 yarn 則不會進行處理;因此若不進行而外判斷,會導致資訊遺失,亦或導致多於資料丟入執行的第三方套件而出現錯誤,如 webpack。

ref : npm config

ref : yarn run args

開發模式

// 使用 npm 套件執行
npm start
// 使用 yarn 套件執行
yarn start

產品編譯

// 使用 npm 套件執行
npm run build
// 使用 yarn 套件執行
yarn run build

可用參數與開發模式相同,但 env.devProxy 並不會作用。

單元測試

npm test

for CI output

npm run test:ci

情境測試

for WebAPI sanity test.

npm run sanity [service name]

§ Document

  • doc/patch:各專案框架版本更動內容與說明。
  • doc/packages:函式庫說明。
  • doc/api : API 送出與接收格式。
  • doc/eslint : eslint 使用規範。
  • 架構規劃、設計文件