The difference between dependencies and devdependencies in maven

Source: Internet
Author: User

NPM install when installing the node module, there are two command parameters that can write their information to the Package.json file:
–save
–save-dev

But its document 1, only mentioned a small difference,-- Save adds the dependent package name to the Package.json file dependencies key, and--save-dev is added under the Package.json file Devdependencies key, such as:
{
"Name": "Yo",
"Version": "0.0.0",
"Dependencies": {},
"Devdependencies": {
"Grunt": "~0.4.1",
"Grunt-contrib-copy": "~0.4.1",
"Grunt-contrib-concat": "~0.3.0",
"Grunt-contrib-uglify": "~0.2.0",
"Grunt-contrib-compass": "~0.7.0",
"Grunt-contrib-jshint": "~0.7.0",
"Grunt-contrib-cssmin": "~0.7.0",
}
}
But that's just their superficial difference. The real difference is that the modules listed below Devdependencies are used in our development, such as grunt-contrib-uglify, we use it to confuse JS files, they are not deployed to the production environment. The modules under dependencies are the dependencies we need in our production environment.

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.