gpt4 book ai didi

visual-studio - 我应该在 ASP.NET MVC 项目的 package.json 中使用 devDependencies 还是 dependencies?

转载 作者:行者123 更新时间:2023-12-04 03:43:35 26 4
gpt4 key购买 nike

我正在创建一个 ASP.NET Core 2.0 MVC application并与 Angular 4 整合.我创建了一个名为 package.json 的 NPM 包配置文件并保存在根文件夹中。

我不想使用angular-cli,而是使用Gulp来编译和打包angular文件。

我在 Visual Studio 2017 安装包时遇到错误。我应该在 package.json 文件中使用 devDependencies 还是 dependencies

{
“版本”:“1.0.0”,
"名称": "asp.net",
“私有(private)”:是的,
“依赖”:{
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/编译器": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-b​​rowser": "^4.2.4",
"@angular/platform-b​​rowser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
“核心 js”:“^2.4.1”,
“一饮而尽”:“^3.9.1”,
"gulp-babel": "7.0.0",
“一饮而尽”:“2.6.1”,
"gulp-sourcemaps": "2.6.1",
“一口 typescript ”:“3.2.1”,
“最小匹配”:“3.0.4”,
“极简主义者”:“1.2.0”,
"rimraf": "2.6.1",
“要求目录”:“0.3.2”,
"rxjs": "^5.4.2",
“systemjs-builder”:“0.16.9”,
"zone.js": "^0.8.14",
“ typescript ”:“2.4.2”
},
“devDependencies”:{
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/编译器": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-b​​rowser": "^4.2.4",
"@angular/platform-b​​rowser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
“核心 js”:“^2.4.1”,
“一饮而尽”:“^3.9.1”,
"gulp-babel": "7.0.0",
“一饮而尽”:“2.6.1”,
"gulp-sourcemaps": "2.6.1",
“一口 typescript ”:“3.2.1”,
“最小匹配”:“3.0.4”,
“极简主义者”:“1.2.0”,
"rimraf": "2.6.1",
“要求目录”:“0.3.2”,
"rxjs": "^5.4.2",
“systemjs-builder”:“0.16.9”,
"zone.js": "^0.8.14",
“ typescript ”:“2.4.2”
}
}

最佳答案

简短的回答是你应该同时使用,你想要捆绑的 UI 库的依赖项,以及允许你开发应用程序的 devDependencies。

这篇文章中有一个很棒的解释:https://stackoverflow.com/a/22004559/1303897

关于visual-studio - 我应该在 ASP.NET MVC 项目的 package.json 中使用 devDependencies 还是 dependencies?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45773098/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com