I think this is more an npm than a Polymer question. I have a quite large Polymer project, which is now up to version 1.3.0 according to bower.json inside the Polymer folder.
我认为这与其说是聚合物问题,不如说是npm问题。我有一个相当大的聚合物项目,据鲍尔说,这个项目现在已经达到了1.3.0版本。聚合物文件夹中的json。
I have been "offline" from this project for about 2 months and now I realized that the Polymer framework is 1.6.0
这个项目我已经“下线”2个月了,现在我意识到这个聚合物框架是1.6.0
How can I update to Polymer 1.6.0 using npm? How can I update all existing components already installed in my project?
如何使用npm更新到聚合物1.6.0 ?如何更新项目中已经安装的所有现有组件?
1 个解决方案
#1
3
All you need to do is update your package.json
to contain the latest Polymer version, like so:
你所需要做的就是更新你的包。json包含最新聚合物版本,如下:
"dependencies": {
"polymer": "~1.6.0"
}
Then, run npm update --save
(see the documentation here) which will find the latest version compatible with ~1.6.0
(e.g. 1.6.1
) and save it in your dependencies.
然后,运行npm update—save(请参阅本文的文档),它将找到与~1.6.0兼容的最新版本(例如1.6.1),并将其保存在您的依赖项中。
If you're not sure what the latest version is, you can "cheat" and set the dependency to "*"
in your package.json
, then run npm update --save
. This will automatically find the latest version and save it in your package.json
.
如果不确定最新版本是什么,可以在包中“欺骗”并将依赖项设置为“*”。然后运行npm更新——保存。这将自动找到最新的版本并将其保存到您的package.json中。
You might also find npm outdated
useful - it will identify outdated dependencies in your package.json
for you to upgrade.
您可能还会发现npm过时了——它将在您的包中识别过时的依赖项。json供您升级。
#1
3
All you need to do is update your package.json
to contain the latest Polymer version, like so:
你所需要做的就是更新你的包。json包含最新聚合物版本,如下:
"dependencies": {
"polymer": "~1.6.0"
}
Then, run npm update --save
(see the documentation here) which will find the latest version compatible with ~1.6.0
(e.g. 1.6.1
) and save it in your dependencies.
然后,运行npm update—save(请参阅本文的文档),它将找到与~1.6.0兼容的最新版本(例如1.6.1),并将其保存在您的依赖项中。
If you're not sure what the latest version is, you can "cheat" and set the dependency to "*"
in your package.json
, then run npm update --save
. This will automatically find the latest version and save it in your package.json
.
如果不确定最新版本是什么,可以在包中“欺骗”并将依赖项设置为“*”。然后运行npm更新——保存。这将自动找到最新的版本并将其保存到您的package.json中。
You might also find npm outdated
useful - it will identify outdated dependencies in your package.json
for you to upgrade.
您可能还会发现npm过时了——它将在您的包中识别过时的依赖项。json供您升级。