我正在尝试使用AngularJS框架来设置我的项目,但似乎在线提供的每个骨架都需要通过npm和/或bower安装大量的依赖项。
我试图避免通过nmp下载,因为该项目是针对公司的,并且存在安全问题。我的想法是手动获取依赖项,但它们似乎无数。有人可以建议我替代或提出解决方案吗?
这些是npm安装的依赖项:
"dependencies": {
"angular": "1.2.6",
"angular-cookies": "1.2.6",
"angular-resource": "1.2.6",
"angular-route": "1.2.6",
"angular-sanitize": "1.2.6",
"angular-http-auth": "1.2.1",
"async": "~0.2.5",
"bootstrap": "~3.0.3",
"angular-ui-bootstrap": "~0.10.0",
"es5-shim": "~2.1.0",
"jquery": "~1.10.2",
"json3": "~3.2.4",
"requirejs": "~2.1.9",
"underscore": "~1.5.2",
"pace": "~0.5.5",
"fontawesome-actions": "~0.5.0",
"ui-bootstrap": "~0.11.0",
"angular-bootstrap": "~0.11.0",
"selectn": "~0.9.6",
"select2": "~3.4.8",
"angular-ui-select2": "~0.0.5",
"angular-ui": "~0.4.0",
"inflection": "~1.3.8",
"momentjs": "~2.8.1",
"jquery-minicolors": "~2.1.6"
},
"devDependencies": {
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6",
"sinon": "~1.7.3",
"chai": "~1.8.1"
},
答案 0 :(得分:2)
你可以使用bower只安装你想要的东西。
开始创建bower.json文件,您只能从某些软件包开始:
{
"name": "Your_app_name",
"description": "",
"version": "0.0.0",
"homepage": "",
"license": "MIT",
"private": true,
"dependencies": {
"bootstrap": "latest",
"font-awesome": "latest",
"animate.css": "latest",
"angular": "latest",
"angular-route": "latest",
"angular-cookies": "latest",
"angular-resource": "latest"
}
}
然后运行:
$> bower install
只添加你需要的东西。 我创建了一个基本模板,我在开始一个新项目时使用它:https://github.com/etienne-bondot/angular-template