polymer 0.9.5+2

Polymer.dart

Polymer.dart is a set of comprehensive UI and utility components for building web applications. With Polymer.dart's custom elements, templating, data binding, and other features, you can quickly build structured, encapsulated, client-side web apps.

Polymer.dart is a Dart port of Polymer created and maintained by the Dart team. The Dart team is collaborating with the Polymer team to ensure that polymer.dart elements and polyfills are fully compatible with Polymer.

Polymer.dart replaces Web UI, which has been deprecated.

Learn More

  • The Polymer.dart homepage contains a list of features, project status, installation instructions, tips for upgrading from Web UI, and links to other documentation.

  • See our TodoMVC example by opening up the Dart Editor's Welcome Page and selecting "TodoMVC".

  • For more information about Dart, see http://www.dartlang.org/.

  • When you use this package, you automatically get the polymer_expressions package, which provides an expressive syntax for use with templates.

Try It Now

Add the polymer.dart package to your pubspec.yaml file:

dependencies:
  polymer: ">=0.9.0 <0.10.0"

Instead of using any, we recommend using version ranges to avoid getting your project broken on each release. Using a version range lets you upgrade your package at your own pace. You can find the latest version number at https://pub.dartlang.org/packages/polymer.

Building and Deploying

To build a deployable version of your app, add the polymer transformers to your pubspec.yaml file:

transformers:
- polymer

Then, run pub build. The polymer transformers assume all files under web are possible entry points, this can be adjusted with arguments in your pubspec.yaml file. For example, you can say only web/index.html is an entry point as follows:

transformers:
- polymer:
    entry_points: web/index.html

Here is a list of arguments used by the polymer transformers: * js: whether to load JS code directly. By default polymer converts your app's html file to load the compiled JS code directly. Setting this parameter to false will keep a dart script tag and the dart.js script tag on the page.

  • csp: whether to load a Content Security Policy (CSP) compliant JS file. Dart2js generates two JS files, one that is not CSP compilant and one that is. By default, polymer uses the former becuase it's likely more efficient, but you can choose the latter by setting this flag.

  • entry_points: can be a list of entry points or, for convenience, a single entry point as shown above.

For example, this specification includes 2 entrypoints and chooses the CSP compliant JS file:

transformers:
- polymer:
    entry_points:
    - web/index.html
    - web/index2.html
    csp: true

Contacting Us

Please file issues in our Issue Tracker or contact us on the Dart Web UI mailing list.

We also have the Web UI development list for discussions about internals of the code, code reviews, etc.

changelog

This file contains highlights of what changes on each version of the polymer package. We will also note important changes to the polyfill packages if they impact polymer: custom_element, html_import, observe, shadow_dom, and template_binding.

Pub version 0.9.4

  • Removes unused dependency on csslib.

Pub version 0.9.3+3

  • Removes workaround now that mirrors implement a missing feature. Requires SDK >= 1.1.0-dev.5.0.

Pub version 0.9.3+2

  • Fix rare canonicalization bug 15694

Pub version 0.9.3+1

  • Fix type error in runner.dart 15649.

Pub version 0.9.3

  • pub-build now runs the linter automatically

Pub version 0.9.2+4

  • fix linter on SVG and MathML tags with XML namespaces

Pub version 0.9.2+3

  • fix 15574, event bindings in dart2js, by working around issue 15573

Pub version 0.9.2+2

  • fix enteredView in dart2js, by using custom_element >= 0.9.1+1

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  polymer: ">=0.9.5+2 <0.10.0"

If your package is an application package you should use any as the version constraint.

2. Install it

If you're using the Dart Editor, choose:

Menu > Tools > Pub Install

Or if you want to install from the command line, run:

$ pub install

3. Import it

Now in your Dart code, you can use:

import 'package:polymer/polymer.dart';
Version Uploaded Archive
0.10.0-pre.9 Apr 11, 2014 Download polymer 0.10.0-pre.9 archive
0.10.0-pre.8 Apr 08, 2014 Download polymer 0.10.0-pre.8 archive
0.10.0-pre.7 Apr 05, 2014 Download polymer 0.10.0-pre.7 archive
0.10.0-pre.6 Apr 03, 2014 Download polymer 0.10.0-pre.6 archive
0.10.0-pre.5 Mar 28, 2014 Download polymer 0.10.0-pre.5 archive
0.10.0-pre.4 Mar 19, 2014 Download polymer 0.10.0-pre.4 archive
0.10.0-pre.3.dev Mar 18, 2014 Download polymer 0.10.0-pre.3.dev archive
0.10.0-pre.2 Mar 10, 2014 Download polymer 0.10.0-pre.2 archive
0.10.0-pre.1 Mar 07, 2014 Download polymer 0.10.0-pre.1 archive
0.10.0-pre.0 Feb 28, 2014 Download polymer 0.10.0-pre.0 archive

All 60 versions...

About

Polymer.dart is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.

Author

Email web-ui-dev@dartlang.org Polymer.dart Authors

Homepage

https://www.dartlang.org/polymer-dart/

Uploader

jmesserly@google.com
sigmund@google.com
dgrove@google.com
nweiz@google.com

Share