Blogger Information
Blog 67
fans 0
comment 2
visits 71994
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
VUE3 Package.json 属性说明
搁浅
Original
821 people have browsed it

name - 包名。

version - 包的版本号。

description - 包的描述。

homepage - 包的官网 url 。

author - 包的作者姓名。

contributors - 包的其他贡献者姓名。

dependencies - 依赖包列表。如果依赖包没有安装,npm 会自动将依赖包安装在node_module 目录下。

repository - 包代码存放的地方的类型,可以是 git 或 svn,git 可在Github上。

main - main 字段指定了程序的主入口文件,require(‘moduleName’) 就会加载这个文件。这个字段的默认值是模块根目录下面的 index.js。

keywords - 关键字

  1. package.json 文件中版本号的说明,安装的时候代表不同的含义:"5.0.3" 表示安装指定的 5.0.3 版本
  2. "~5.0.3" 表示安装 5.0.X 中最新的版本
  3. "^5.0.3" 表示安装 5.X.X 中最新的版本
  1. {
  2. "name": "pcadmin",//包名
  3. "version": "0.1.0",//包的版本号
  4. "private": true,
  5. "scripts": {//npm run执行的都是这里面的命令
  6. "serve": "vue-cli-service serve",
  7. "build": "vue-cli-service build",
  8. "lint": "vue-cli-service lint",
  9. "server": "webpack-dev-server --open"
  10. },
  11. "dependencies": {//依赖包列表。如果依赖包没有安装,npm 会自动将依赖包安装在node_module 目录下。
  12. "axios": "^1.3.4",
  13. "core-js": "^3.8.3",
  14. "echarts": "^5.4.1",
  15. "element-plus": "^2.2.28",
  16. "lib-flexible": "^0.3.2",
  17. "postcss-px2rem": "^0.3.0",
  18. "register-service-worker": "^1.7.2",
  19. "three": "^0.150.0",
  20. "three-css2drender": "^1.0.0",
  21. "three-obj-mtl-loader": "^1.0.3",
  22. "three-orbit-controls": "^82.1.0",
  23. "vant": "^4.1.0",
  24. "vue": "^3.2.13",
  25. "vue-echarts": "^6.5.4",
  26. "vue-router": "^4.0.3",
  27. "vuex": "^4.0.0"
  28. },
  29. "devDependencies": {//开发时候的依赖项
  30. "@babel/core": "^7.12.16",
  31. "@babel/eslint-parser": "^7.12.16",
  32. "@vue/cli-plugin-babel": "~5.0.0",
  33. "@vue/cli-plugin-eslint": "~5.0.0",
  34. "@vue/cli-plugin-pwa": "~5.0.0",
  35. "@vue/cli-plugin-router": "~5.0.0",
  36. "@vue/cli-plugin-vuex": "~5.0.0",
  37. "@vue/cli-service": "~5.0.0",
  38. "babel-plugin-import": "^1.13.3",
  39. "babel-plugin-transform-remove-console": "^6.9.4",
  40. "compression-webpack-plugin": "^10.0.0",
  41. "eslint": "^7.32.0",
  42. "eslint-plugin-vue": "^8.0.3",
  43. "less": "^4.1.3",
  44. "less-loader": "^11.1.0",
  45. "sass": "^1.26.5",
  46. "sass-loader": "^13.2.0",
  47. "webpack-dev-server": "^4.11.1"
  48. },
  49. "eslintConfig": {//eslint语法检查配置
  50. "root": true,
  51. "env": {
  52. "node": true
  53. },
  54. "extends": [
  55. "plugin:vue/vue3-essential",
  56. "eslint:recommended"
  57. ],
  58. "parserOptions": {
  59. "parser": "@babel/eslint-parser"
  60. },
  61. "rules": {}
  62. },
  63. "browserslist": [//浏览器配置
  64. "> 1%",//兼容99的浏览器
  65. "last 2 versions",
  66. "not dead",
  67. "not ie 11"
  68. ]
  69. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post