如何使用凉亭安装聚合物铁元件?

How to install Polymer iron-elements using bower?

如何使用 Bower 安装 Polymer 0.9 的聚合物铁和纸元素?尝试使用 bower 以类似于核心元素的方式进行安装,但失败了。迁移指南未提供有关升级 core/iron 或纸质元素的任何信息。

bower install Polymer/iron-elements#^0.9.0

bower iron-elements#^0.9.0  not-cached git://github.com/Polymer/iron-elements.git#^0.9.0
bower iron-elements#^0.9.0     resolve git://github.com/Polymer/iron-elements.git#^0.9.0
bower iron-elements#^0.9.0     ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/Polymer/iron-elements.git", exit code of #128 fatal: remote error:    Repository not found.

新的 0.9 元素是 here
你可以这样用 bower 得到它们:

bower install polymerelements/iron-ajax

我认为还没有准备好完整的元素集合,您可能应该下载每个需要的元素。

您可以在 0.9 release info 中找到有关新元素的更多信息:

Where did the elements go?
Not all elements have been ported to the current release, but we’re porting them as fast as we can. You can find work-in-progress versions of many elements in the PolymerElements GitHub organization.

The elements are being reorganized into more consistent product lines, including:

Iron elements. Basic elements that don’t express a visual style. Most of the old core- elements are being renamed to iron-. Some former core- elements that implemented material design (such as core-toolbar, core-menu, core-header-panel) are being migrated to paper-.

Paper elements. Material design elements. All of the old paper- elements, plus a few of the old core- elements.

Neon elements. Animation elements.

These element sets will be launching with their own site sometime around the Polymer 1.0 timeframe. The new site will include API docs for the elements. If you want to get started with the work-in-progress versions, the individual repos are the best source for information about the elements right now.

You can also check out the community Road to Polymer project which is tracking the status of Polymer elements.

此外,您可能会在 Polymer Blog 中找到一些有价值的信息。敬请期待!

谢谢马特奥。添加到 Matteo 的答案中,我们可以使用以下 bower 命令为 Polymer 0.9.0 安装所有可用的 ported iron 和 paper 元素

bower install polymerelements/iron-elements
bower install polymerelements/paper-elements

我遇到了与您报告的相同的错误,并且无法按照上述建议使用 bower 安装任何元素。但是,在我的项目文件夹中执行 运行 后一切正常:

git config --local url."https://".insteadOf "git://"

您可以在此处找到有关此解决方案的更多详细信息: Bower Install error: Unable to connect & exit code of #128

对于任何元素安装,首先进入元素页面: https://elements.polymer-project.org/ 并找到你想要的元素。而在元素页面的左侧,有 'Bower Command' 部分。 只需复制并将其粘贴到您的 shell/terminal/command 提示符中即可。