我刚刚创建了一个聚合物元素。我不明白的是,当我在应用程序中使用它时,它的依赖项(其他聚合物元素)丢失了。
我的文件头:
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-icons/iron-icons.html">
<link rel="import" href="../iron-icon/iron-icon.html">
<link ref="import" href="../paper-styles/color.html">
<link ref="import" href="../polymer-keydown/polymer-keydown.html">
<link rel="import" href="../iron-a11y-keys/iron-a11y-keys.html">
我的bower.json
:
{
"name": "my-el",
"description": "a description",
"main": "my-el.html",
"dependencies": {
"polymer": "Polymer/polymer#^1.4.0",
"iron-icons": "PolymerElements/iron-icons#^1.1.3",
"iron-icon": "PolymerElements/iron-icon#^1.0.10",
"iron-a11y-keys": "PolymerElements/iron-a11y-keys#^1.0.6",
"polymer-keydown": "dmytroyarmak/polymer-keydown#^0.1.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.4"
}
}
运行一个简单的示例时,仅加载部分依赖项。这是组件文件夹,它显示在开发人员控制台的源选项卡下:
components
├── iron-a11y-keys
├── iron-a11y-keys-behavior
├── iron-flex-layout
├── iron-icon
├── iron-icons
├── iron-iconset-svg
├── iron-meta
├── my-el
├── polymer
├── webcomponentsjs
它尝试以polymer serve
和polyserve
相同的行为启动应用程序。
为什么polymer-keydown
和paper-styles
失踪?