npm install --save-dev <package-name>--save参数: 告诉npm将安装的包添加到 package.json 文件的 dependencies 部分,这表示这些包是生产环境所需的依赖,即你的应用或项目在运行时需要这些包。 --save-dev参数: 将包添加到 package.json 文件的 devDependencies
问将npm模块作为自身的devDependency安装ENnpm安装模块 【npm install xxx】利用 npm 安装xxx模块到当前命...
You will use this option when you want to save a package dependency for distribution. Item such as angularjs, or any other module that isrequired at run time by your program. dependencies下的模块,是我们生产环境中需要的依赖。 参考链接http://imcodebased.com/npm-save-or-save-dev-which-one-...
npm update --save duplicates updated devDependencies into the dependency sections, and leaves the old version is devDependencies. It seems like --save should update all dependencies in their appropriate section (preferred) or skip devDependencies. It seems that running npm update --save-dev before n...
andtries to guess sensible defaults.See`npm help json`fordefinitive documentation on these fieldsandexactly what theydo.Use`npm install <pkg> --save`afterwards to install apackageandsave itasa dependencyinthepackage.json file.Press^C at any time to quit.name:(node_modules)runoob# 模块名version...
一文搞懂npm --save和--save -dev的区别 开发时依赖(--save -dev) 运行时依赖(--save) 众所周知,npm安装插件的时候,会把插件都安装在package.json文件中,而安装插件有两种安装方式,npm install XXX --save 和npm install XXX --save -dev,–save对应的是运行时依赖,会把插件安装在文件下的...npm...
npm install eslint --save-dev </> Copy Code This command will addeslintas adevDependencyand update your package.json file. "devDependencies": { "eslint": "^8.0.0" } </> Copy Code Learn how you can manage development dependencies to keep your projects running smoothly. Enroll in upGrad...
Install SuperTest as an npm module and save it to your package.json file as a development dependency: npm install supertest --save-dev Once installed it can now be referenced by simply callingrequire('supertest'); Example You may pass anhttp.Server, or aFunctiontorequest()- if the server ...
If you have a devDependency, in my case pify for tests, and then later need it as a production dependency, npm install pify (even with --save) doesn't save it under dependencies. What's really worrying is that the cli output looks like a successful install. Also, local tests will sti...
ENgulp目前以devDependency的形式安装为:"gulp": "github:gulpjs/gulp"DI (依赖项注入) 是一种在...