当我在angularjs 2中配置bootstrap时,我在此链接中遇到了以下步骤,
How to add bootstrap to an angular-cli project
npm i bootstrap@next
我理解我们是否运行以下命令,
npm i -S bootstrap@4.0.0-alpha.4
然后这将安装bootstrap alpha版本。但是,如果我们给@next,将安装哪个版本?
还有什么 - 保存@next喜欢,
npm i bootstrap@next --save
哪个推荐?以及我们如何确认已安装版本的版本?
答案 0 :(得分:2)
在NPM包名称后面使用@
表示版本或标记
尝试npm view bootstrap
您将获得此输出:
请注意,标记
next
适用于版本4.0.0-alpha.6
view
命令的文档:https://docs.npmjs.com/cli/view
{ name: 'bootstrap',
description: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
'dist-tags': { latest: '3.3.7', next: '4.0.0-alpha.6' },
versions:
[ '0.0.1',
'0.0.2',
'3.1.1',
'3.2.0',
'3.3.0',
'3.3.1',
'3.3.2',
'3.3.4',
...
对于--save
或-S
,它们都是同一事物的别名
在此处阅读更多内容:https://docs.npmjs.com/cli/install
来自上面的npm install
doc链接:
-S, - save:包将出现在您的依赖项中。