导入并使用Polymer-Dart 1.0.0版本候选 [英] Import and make use of Polymer-Dart 1.0.0 release candidate

查看:129
本文介绍了导入并使用Polymer-Dart 1.0.0版本候选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢Polymer - 我也喜欢Dart。而且Polymer-Dart库是Web开发(imho)最好的东西。



Polymer 1.0已经发布了一段时间,Google员工正在努力工作构建相应的Dart包装器,如Dart的Web开发Google群组中所述。



我在Polymer 0.5中建立了一个相当大的项目,现在是升级的时候了。由于聚合物1.0的各种变化,迁移是相当困难的,并且预期很多代码破坏。由于聚合物1.0旨在构建未来版本的最终API结构,我决定从零开始,在Polymer 1.0中构建项目。现在,没有官方的0.17 Polymer-Dart包装器发布,这就是为什么我要使用开发分支'0.17-0-dev-interop-reverse'。



然而,现在,我想知道,如何实际导入Polymer-Dart dev项目到我的Polymer Dart项目中。
我使用Webstorm 10和Dart 1.11.3。



此外,开发版本目前不支持什么?我读的地方,它缺少一个变压器 - 是否仍然是这种情况?



我的问题是基本上,如何使用Polymer 1.0在Dart已经没有等待 cub>

c>它适用于我:



Dart Polymer 1.0.0-rc.2

  name:todomvc 
描述:使用polymer.dart包构建的TodoMVC
版本:0.15.1
dependencies:
browser:any
polymer:1.0.0-rc.2
polymer_elements:1.0.0-rc.2
reflectable:0.3.2
web_components:^ 0.12.0

transformers:
- web_components:
entry_points:
- web / index.html
- test / listorder_test。 html
- test / markdone_test.html
- test / mainpage_test.html
- reflectable:
entry_points:
- web / index.dart
- test /listorder_test.dart
- test / markdone_test.dart
- test / mainpage_test.dart
- test / pub_serve:
$ include:test / ** _ test {。*,} .dart
- $ dart2js:
minify:true

环境:
sdk:> = 1.2.0< 2.0.0

有一个 TodoMVC应用程序移植到Polymer.dart 0.17(参见分支 polymer-0.17 polymer-0.17-行为


I do love Polymer - and I do love Dart. And the Polymer-Dart library was pretty much the best thing ever happend to Web development (imho).

Polymer 1.0 has been released a while ago and Googlers are working hard to build the corresponding Dart wrapper as stated in Dart's Web Development Google Group.

I've built a fairly huge project quite a while ago in Polymer 0.5 and it's time to upgrade. Due to various changes in Polymer 1.0 the migration is quite hard and a lot of code breaks are expected. Since Polymer 1.0 is meant to build the final API structure for future releases, I decided to start from scratch and build the project in Polymer 1.0. Right now, there is no official 0.17 Polymer-Dart wrapper released, which is why I want to make use of the developement branch '0.17-0-dev-interop-reverse'.

However, right now, I am wondering, how to actually import the Polymer-Dart dev project into my Polymer Dart project. I am using Webstorm 10 and Dart 1.11.3.

Also, what is currently not supported by the development version? I read somewhere that it's missing a transformer - is that still the case?

My question is basically, how to use Polymer 1.0 in Dart already without waiting for the official 0.17 release.

解决方案

With the following pubspec.yaml it works fine for me:

Dart Polymer 1.0.0-rc.2

name: todomvc
description: TodoMVC built with the polymer.dart package
version: 0.15.1
dependencies:
  browser: any
  polymer: 1.0.0-rc.2
  polymer_elements: 1.0.0-rc.2
  reflectable: 0.3.2
  web_components: ^0.12.0

transformers:
- web_components:
    entry_points:
    - web/index.html
    - test/listorder_test.html
    - test/markdone_test.html
    - test/mainpage_test.html
- reflectable:
    entry_points:
    - web/index.dart
    - test/listorder_test.dart
    - test/markdone_test.dart
    - test/mainpage_test.dart
- test/pub_serve:
    $include: test/**_test{.*,}.dart
- $dart2js:
    minify: true

environment:
  sdk: ">=1.2.0 <2.0.0"

There is an TodoMVC application ported to Polymer.dart 0.17 (see the branches polymer-0.17 and polymer-0.17-behaviors.

这篇关于导入并使用Polymer-Dart 1.0.0版本候选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆