iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 4
0

使用VsCode編輯器

在根目錄安裝套件如下

{
  "name": "erp-system",
  "version": "1.0.0",
  "description": "it's private project",
  "main": "index.js",
  "scripts": {
    "client": "cd client && npm run dev",
    "server": "cd server && node index.js --ignore tests",
    "analyze": "cd client && npm run analyze",
    "install-dev": "concurrently \"cd server && npm i\" \"cd client && npm i\"",
    "dev": "concurrently \"npm run server\" \"npm run client\"",
    "ci": "concurrently \"npm run client\" \"npm run ci-server\"",
    "ci-server": "cd server && npm run ci",
    "precommit": "npm run pretty-quick && npm run lint",
    "pretty-quick": "pretty-quick --staged",
    "lint": "echo 'Linting...' && eslint . && echo 'Lint finished.'",
    "test": "echo 'Test...' && npm run test-client && echo 'Test finished.'",
    "test-client": "cd client && npm run test"
  },
  "repository": {
    "type": "git",
    "url": "git+ssh://git@gitlab.com/polo13999/erp-system.git"
  },
  "keywords": [],
  "license": "ISC",
  "bugs": {
    "url": "https://gitlab.com/polo13999/erp-system/issues"
  },
  "homepage": "https://gitlab.com/polo13999/erp-system#README",
  "devDependencies": {
    "babel-eslint": "^8.2.3",
    "concurrently": "^3.6.0",
    "cross-env": "^5.2.0",
    "eslint": "^4.19.1",
    "eslint-config-prettier": "^2.9.0",
    "eslint-plugin-jest": "^21.17.0",
    "eslint-plugin-react": "^7.9.1",
    "husky": "^0.14.3",
    "nodemon": "^1.17.5",
    "prettier": "^1.13.5",
    "pretty-quick": "^1.6.0"
  },
  "dependencies": {
    "jest": "^23.1.0",
    "jest-environment-node": "^23.1.0",
    "moment": "^2.22.2",
    "moment-timezone": "^0.5.21",
    "puppeteer": "^1.4.0",
    "recharts": "^1.0.0-beta.10",   
  }
}

npm 安裝套件

eslist相關套件 開發中語法檢查
concurrently 可以同使啟動多個node
husky git commit 時候 會再檢查一次是否有error
prettier 讓程式碼看起來更漂亮會自動排版可以搭配 prettier.rc 設定
moment-timezone 因為使用ant 時間相關的元件都會用到moment 這時要用時區設定一下
puppeteer e2e 測試用
jest 測試用

以上是個人開發時 偏好使用的套件


上一篇
起手式(Server)
下一篇
初探 gitlab 部署
系列文
Next + Ant + Apollo Graphql + Mongo 後台系統 製作與發佈10
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言