Package. json file configuration details, package. json details

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.