看来你必须手动检查一堆repos,当我试图运行core-tests runner.html时,它们引用了受浏览器限制的文件夹外部的htmls
聚合物使用组件的概念.我们将a定义component为文件夹中的一组可共享资源.所有组件应该放在一个主文件夹中(我通常称之为components).这样,一个组件可以通过查看引用另一个组件../<component-name>/.
一个项目通常看起来像这样:
my-project/
index.html
components/ <-- could be symlink or a server redirection
platform/ <-- polyfills
polymer/ <-- polymer
core-ajax/ <-- a custom element
...
Run Code Online (Sandbox Code Playgroud)
core-tests特别是,它本身就是一个组成部分.它位于components文件夹中并在其他组件上运行测试(通过查看../<component-name>/如上).
因此,如果上面示例中的Web-root是my-project,您应该能够访问my-project/components/core-tests/runner.html以运行这些组件测试.
有多种方法可以填充components文件夹.最简单的方法是使用Bower(http://bower.io)命令bower install Polymer/core-elements.
您还可以使用Git签出或ZIP存档.有一个非常棒的实用程序,可以下载Bower包作为zip文件bowerarchiver.appspot.com.例如:
http://bowerarchiver.appspot.com/archive?core-elements=Polymer/core-elements
将为您提供core-elementsPolymer组件的zip ,包含所有依赖项.