Package. json file configuration details, package. json details
Package. json is the configuration file automatically generated under the root directory of the project after the npm init command is initialized. It defines the configuration information of this project and the required modules, npm install automatically downloads the required modules based on this command. Package. json is a json file. json itself is only a data format and does not support annotation. The annotation here is only for a more convenient understanding of each field of package. json
{// Project name "name": "demo", // version is a version (follow the "major version. minor version. minor version format) "version": "1.0.0", // description describes your module, or search for "description": "vue. js iview ", // The main field specifies the loaded entry file" main ":" app. js ", // scripts specifies the npm command line abbreviation for running script commands. For example, start specifies the command to be executed when running npm run start. "Scripts": {"start": "node index. js "}, // repository (repository) specifies a code storage address" repository ": {" type ":" git "," url ":" git + https://github.com/xxxx "}, "author": "mayuan", "license": "ISC", "bugs": {"url": "https://github.com/XXXX”}, // a string array, this module "keywords": ["vue", "iview"], "entry": {"main": ". /web/index. js "}, // project homepage url" homepage ":" https://github.com/xxxx", // devDependencies specifies the module "devDependencies" required for project development: {"babel-core ": "^ 6.23.1", "babel-loader": "^ 6.3.2", "babel-preset-es2015": "^ 6.22.0", "vue-html-loader": "^ 1.0.0 ", "vue-loader": "^ 8.5.2", "vue-style-loader": "^ 1.0.0", "webpack": "^ 1.13.2 "}, // The dependencies field specifies the module "dependencies": {"underscore": "^ 1.8.3", "vue": "^ 2.1.4 "},}
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.