0

次のように、bower を使用してポリマー紙要素をインストールしています。

bower install Polymer/paper-tabs

結果のフォルダー構造には、次のようにバージョン番号が含まれます。

bower_components/paper-tabs/paper-tabs-0.4.2

鼻をかむと完全なパスをインポートに追加できますが、その後の依存関係は解決されません。たとえば、paper-tabs は paper-tabs/core-selector をインポートできません。

私は使っている:

  • ノード 0.10.26
  • バウアー 1.3.12
  • ポリマー 0.4.2
  • 紙の要素 0.4.2

bower CLI オプションを確認しましたが、バージョン フォルダーの作成を抑制する明確な方法がわかりません。

何かご意見は?

ありがとう - CT

4

1 に答える 1

0

おそらく、ディレクトリではなく HTML ファイルをインポートすると役立つ場合があります。

<link rel="import" href="bower_components/paper-tabs/paper-tabs.html">

その後の依存関係が解決されない可能性は、サーバーのルートの場所です。bower_components と同じディレクトリ レベルからサービスを提供している場合、上記の HTML インポートを同じレベルに挿入すると機能するはずです。

参考までに、依存関係のウォーターフォールは次のようになります。

$ bower install Polymer/paper-tabs
bower cached        git://github.com/Polymer/paper-tabs.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-tabs.git#*
bower cached        git://github.com/Polymer/core-selector.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-selector.git#^0.4.0
bower cached        git://github.com/Polymer/core-icons.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-icons.git#^0.4.0
bower cached        git://github.com/Polymer/core-toolbar.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-toolbar.git#^0.4.0
bower cached        git://github.com/Polymer/font-roboto.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/font-roboto.git#^0.4.0
bower cached        git://github.com/Polymer/paper-icon-button.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-icon-button.git#^0.4.0
bower cached        git://github.com/Polymer/paper-ripple.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-ripple.git#^0.4.0
bower cached        git://github.com/Polymer/polymer.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/polymer.git#^0.4.0
bower cached        git://github.com/Polymer/core-selection.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-selection.git#^0.4.0
bower cached        git://github.com/Polymer/core-icon.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-icon.git#^0.4.0
bower cached        git://github.com/Polymer/core-iconset-svg.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-iconset-svg.git#^0.4.0
bower cached        git://github.com/Polymer/core-icon-button.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-icon-button.git#^0.4.0
bower cached        git://github.com/Polymer/core-media-query.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-media-query.git#^0.4.0
bower cached        git://github.com/Polymer/paper-button.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-button.git#^0.4.0
bower cached        git://github.com/Polymer/core-iconset.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-iconset.git#^0.4.0
bower cached        git://github.com/Polymer/paper-focusable.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-focusable.git#^0.4.0
bower cached        git://github.com/Polymer/paper-shadow.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/paper-shadow.git#^0.4.0
bower cached        git://github.com/Polymer/core-component-page.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-component-page.git#^0.4.0
bower cached        git://github.com/Polymer/platform.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/platform.git#^0.4.0
bower cached        git://github.com/Polymer/core-meta.git#0.4.2
bower validate      0.4.2 against git://github.com/Polymer/core-meta.git#^0.4.0
bower install       paper-tabs#0.4.2
bower install       core-selector#0.4.2
bower install       core-icons#0.4.2
bower install       core-toolbar#0.4.2
bower install       paper-ripple#0.4.2
bower install       font-roboto#0.4.2
bower install       paper-icon-button#0.4.2
bower install       core-selection#0.4.2
bower install       core-iconset-svg#0.4.2
bower install       core-icon#0.4.2
bower install       core-media-query#0.4.2
bower install       core-icon-button#0.4.2
bower install       paper-button#0.4.2
bower install       polymer#0.4.2
bower install       core-iconset#0.4.2
bower install       paper-focusable#0.4.2
bower install       paper-shadow#0.4.2
bower install       core-component-page#0.4.2
bower install       platform#0.4.2
bower install       core-meta#0.4.2

paper-tabs#0.4.2 bower_components/paper-tabs
├── core-icons#0.4.2
├── core-selector#0.4.2
├── core-toolbar#0.4.2
├── font-roboto#0.4.2
├── paper-icon-button#0.4.2
└── paper-ripple#0.4.2

core-selector#0.4.2 bower_components/core-selector
├── core-selection#0.4.2
└── polymer#0.4.2

core-icons#0.4.2 bower_components/core-icons
├── core-icon#0.4.2
├── core-iconset-svg#0.4.2
└── polymer#0.4.2

core-toolbar#0.4.2 bower_components/core-toolbar
├── core-icon-button#0.4.2
└── core-media-query#0.4.2

paper-ripple#0.4.2 bower_components/paper-ripple
├── core-icon#0.4.2
├── core-icons#0.4.2
└── font-roboto#0.4.2

font-roboto#0.4.2 bower_components/font-roboto

paper-icon-button#0.4.2 bower_components/paper-icon-button
├── core-selector#0.4.2
├── paper-button#0.4.2
└── polymer#0.4.2

core-selection#0.4.2 bower_components/core-selection
└── polymer#0.4.2

core-iconset-svg#0.4.2 bower_components/core-iconset-svg
├── core-iconset#0.4.2
└── polymer#0.4.2

core-icon#0.4.2 bower_components/core-icon
├── core-icons#0.4.2
└── core-iconset#0.4.2

core-media-query#0.4.2 bower_components/core-media-query
└── polymer#0.4.2

core-icon-button#0.4.2 bower_components/core-icon-button
└── core-icons#0.4.2

paper-button#0.4.2 bower_components/paper-button
├── core-icon#0.4.2
├── paper-focusable#0.4.2
├── paper-ripple#0.4.2
├── paper-shadow#0.4.2
└── polymer#0.4.2

polymer#0.4.2 bower_components/polymer
├── core-component-page#0.4.2
└── platform#0.4.2

core-iconset#0.4.2 bower_components/core-iconset
├── core-icon#0.4.2
├── core-meta#0.4.2
└── polymer#0.4.2

paper-focusable#0.4.2 bower_components/paper-focusable
└── polymer#0.4.2

paper-shadow#0.4.2 bower_components/paper-shadow
└── polymer#0.4.2

core-component-page#0.4.2 bower_components/core-component-page
├── platform#0.4.2
└── polymer#0.4.2

platform#0.4.2 bower_components/platform

core-meta#0.4.2 bower_components/core-meta
└── polymer#0.4.2

paper-tabs ディレクトリはこれらのファイルを生成します (ディレクトリに追加されたバージョン番号はありません):

README.md   demo.html   metadata.html   paper-tab.html  paper-tabs.html
bower.json  index.html  paper-tab.css   paper-tabs.css
于 2014-10-25T01:17:25.150 に答える