package.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. "name": "web",
  3. "version": "0.1.0",
  4. "private": true,
  5. "scripts": {
  6. "dev": "cross-env env_config=dev vue-cli-service serve",
  7. "build": "cross-env env_config=test vue-cli-service build",
  8. "build:t": "cross-env env_config=test vue-cli-service build",
  9. "build:p": "cross-env env_config=prod vue-cli-service build",
  10. "lint": "vue-cli-service lint",
  11. "qiniu": "bash ./scripts/cdn/qiniu.sh dist",
  12. "deploy": "bash ./scripts/deploy/deploy.sh dist",
  13. "release": "npm run build:p && npm run qiniu && npm run deploy",
  14. "server": "npm run build:t && bash ./scripts/deploy/transport_test_file.sh dist",
  15. "fix": "prettier --write .",
  16. "lint-staged": "lint-staged"
  17. },
  18. "dependencies": {
  19. "axios": "^0.18.0",
  20. "core-js": "^2.6.12",
  21. "crypto-js": "^3.1.9-1",
  22. "swiper": "^4.5.0",
  23. "vue": "^2.6.6",
  24. "vue-router": "^3.0.1",
  25. "vuex": "^3.0.1",
  26. "weixin-js-sdk": "^1.4.0-test"
  27. },
  28. "devDependencies": {
  29. "@commitlint/cli": "^11.0.0",
  30. "@commitlint/config-conventional": "^11.0.0",
  31. "@vue/cli-plugin-babel": "^3.5.0",
  32. "@vue/cli-plugin-eslint": "^3.5.0",
  33. "@vue/cli-plugin-unit-jest": "^3.5.0",
  34. "@vue/cli-service": "^3.5.0",
  35. "@vue/test-utils": "1.0.0-beta.29",
  36. "@babel/eslint-parser": "^7.17.0",
  37. "babel-core": "7.0.0-bridge.0",
  38. "babel-jest": "^23.6.0",
  39. "babel-plugin-component": "^1.1.1",
  40. "cross-env": "^5.2.1",
  41. "eslint": "^5.16.0",
  42. "eslint-plugin-vue": "^5.0.0",
  43. "husky": "^4.3.0",
  44. "less": "^3.0.4",
  45. "less-loader": "^4.1.0",
  46. "vue-loader": "^14.2.2",
  47. "vue-template-compiler": "^2.5.21"
  48. },
  49. "eslintConfig": {
  50. "root": true,
  51. "env": {
  52. "node": true
  53. },
  54. "extends": [
  55. "plugin:vue/essential",
  56. "eslint:recommended"
  57. ],
  58. "rules": {
  59. "no-undef": 0,
  60. "no-console": 0,
  61. "no-unused-vars": 0,
  62. "indent": "off",
  63. "vue/script-indent": [
  64. "error",
  65. 2
  66. ]
  67. },
  68. "parserOptions": {
  69. "parser": "@babel/eslint-parser"
  70. }
  71. },
  72. "postcss": {
  73. "plugins": {
  74. "autoprefixer": {}
  75. }
  76. },
  77. "browserslist": [
  78. "> 1%",
  79. "last 2 versions",
  80. "not ie <= 8"
  81. ],
  82. "jest": {
  83. "moduleFileExtensions": [
  84. "js",
  85. "jsx",
  86. "json",
  87. "vue"
  88. ],
  89. "transform": {
  90. "^.+\\.vue$": "vue-jest",
  91. ".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
  92. "^.+\\.jsx?$": "babel-jest"
  93. },
  94. "transformIgnorePatterns": [
  95. "/node_modules/"
  96. ],
  97. "moduleNameMapper": {
  98. "^@/(.*)$": "<rootDir>/src/$1"
  99. },
  100. "snapshotSerializers": [
  101. "jest-serializer-vue"
  102. ],
  103. "testMatch": [
  104. "**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
  105. ],
  106. "testURL": "http://localhost/"
  107. },
  108. "husky": {
  109. "hooks": {
  110. "pre-commit": "lint-staged",
  111. "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
  112. }
  113. },
  114. "lint-staged": {
  115. "*.{js,jsx}": [
  116. "prettier --write .",
  117. "git add"
  118. ]
  119. }
  120. }