| OLD | NEW |
| 1 Polymer.dart | 1 Polymer.dart |
| 2 ============ | 2 ============ |
| 3 | 3 |
| 4 Polymer.dart is a set of comprehensive UI and utility components | 4 Polymer.dart is a set of comprehensive UI and utility components |
| 5 for building web applications. | 5 for building web applications. |
| 6 With Polymer.dart's custom elements, templating, data binding, | 6 With Polymer.dart's custom elements, templating, data binding, |
| 7 and other features, | 7 and other features, |
| 8 you can quickly build structured, encapsulated, client-side web apps. | 8 you can quickly build structured, encapsulated, client-side web apps. |
| 9 | 9 |
| 10 Polymer.dart is a Dart port of | 10 Polymer.dart is a Dart port of |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 ```yaml | 41 ```yaml |
| 42 dependencies: | 42 dependencies: |
| 43 polymer: any | 43 polymer: any |
| 44 ``` | 44 ``` |
| 45 | 45 |
| 46 Instead of using `any`, we recommend using version ranges to avoid getting your | 46 Instead of using `any`, we recommend using version ranges to avoid getting your |
| 47 project broken on each release. Using a version range lets you upgrade your | 47 project broken on each release. Using a version range lets you upgrade your |
| 48 package at your own pace. You can find the latest version number at | 48 package at your own pace. You can find the latest version number at |
| 49 <https://pub.dartlang.org/packages/polymer>. | 49 <https://pub.dartlang.org/packages/polymer>. |
| 50 | 50 |
| 51 Building and Deploying |
| 52 ---------------------- |
| 51 | 53 |
| 52 Running Tests | 54 To build a deployable version of your app, add the polymer transformers to your |
| 53 ------------- | 55 pubspec.yaml file: |
| 54 | 56 |
| 55 Install dependencies using the [Pub Package Manager][pub]. | 57 ```yaml |
| 56 ```bash | 58 transformers: |
| 57 pub install | 59 - polymer |
| 60 ``` |
| 58 | 61 |
| 59 # Run command line tests and automated end-to-end tests. It needs two | 62 Then, run `pub build`. The polymer transformers assume all files under `web` |
| 60 # executables on your path: `dart` and `content_shell` (see below | 63 are possible entry points, this can be adjusted with arguments in your |
| 61 # for links to download `content_shell`) | 64 pubspec.yaml file. For example, you can say only `web/index.html` is an entry |
| 62 test/run.sh | 65 point as follows: |
| 66 |
| 67 ```yaml |
| 68 transformers: |
| 69 - polymer: |
| 70 entry_points: web/index.html |
| 63 ``` | 71 ``` |
| 64 Note: To run browser tests you will need to have [content_shell][cs], | |
| 65 which can be downloaded prebuilt for [Ubuntu Lucid][cs_lucid], | |
| 66 [Windows][cs_win], or [Mac][cs_mac]. You can also build it from the | |
| 67 [Dartium and content_shell sources][dartium_src]. | |
| 68 | 72 |
| 69 For Linux users all the necessary fonts must be installed see | 73 Here is a list of arguments used by the polymer transformers: |
| 70 <https://code.google.com/p/chromium/wiki/LayoutTestsLinux>. | 74 * js: whether to load JS code directly. By default polymer converts your app's |
| 75 html file to load the compiled JS code directly. Setting this parameter to |
| 76 false will keep a dart script tag and the `dart.js` script tag on the page. |
| 77 |
| 78 * csp: whether to load a Content Security Policy (CSP) compliant JS file. |
| 79 Dart2js generates two JS files, one that is not CSP compilant and one that is. |
| 80 By default, polymer uses the former becuase it's likely more efficient, but |
| 81 you can choose the latter by setting this flag. |
| 82 |
| 83 * entry_points: can be a list of entry points or, for convenience, a single |
| 84 entry point as shown above. |
| 85 |
| 86 For example, this specification includes 2 entrypoints and chooses the CSP |
| 87 compliant JS file: |
| 88 |
| 89 ```yaml |
| 90 transformers: |
| 91 - polymer: |
| 92 entry_points: |
| 93 - web/index.html |
| 94 - web/index2.html |
| 95 csp: true |
| 96 ``` |
| 97 |
| 71 | 98 |
| 72 Contacting Us | 99 Contacting Us |
| 73 ------------- | 100 ------------- |
| 74 | 101 |
| 75 Please file issues in our [Issue Tracker][issues] or contact us on the | 102 Please file issues in our [Issue Tracker][issues] or contact us on the |
| 76 [Dart Web UI mailing list][mailinglist]. | 103 [Dart Web UI mailing list][mailinglist]. |
| 77 | 104 |
| 78 We also have the [Web UI development list][devlist] for discussions about | 105 We also have the [Web UI development list][devlist] for discussions about |
| 79 internals of the code, code reviews, etc. | 106 internals of the code, code reviews, etc. |
| 80 | 107 |
| 81 [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html | 108 [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html |
| 82 [pub]: http://www.dartlang.org/docs/pub-package-manager/ | 109 [pub]: http://www.dartlang.org/docs/pub-package-manager/ |
| 83 [cs]: http://www.chromium.org/developers/testing/webkit-layout-tests | 110 [cs]: http://www.chromium.org/developers/testing/webkit-layout-tests |
| 84 [cs_lucid]: http://gsdview.appspot.com/dartium-archive/continuous/drt-lucid64.zi
p | 111 [cs_lucid]: http://gsdview.appspot.com/dartium-archive/continuous/drt-lucid64.zi
p |
| 85 [cs_mac]: http://gsdview.appspot.com/dartium-archive/continuous/drt-mac.zip | 112 [cs_mac]: http://gsdview.appspot.com/dartium-archive/continuous/drt-mac.zip |
| 86 [cs_win]: http://gsdview.appspot.com/dartium-archive/continuous/drt-win.zip | 113 [cs_win]: http://gsdview.appspot.com/dartium-archive/continuous/drt-win.zip |
| 87 [dartium_src]: http://code.google.com/p/dart/wiki/BuildingDartium | 114 [dartium_src]: http://code.google.com/p/dart/wiki/BuildingDartium |
| 88 [TodoMVC]: http://addyosmani.github.com/todomvc/ | 115 [TodoMVC]: http://addyosmani.github.com/todomvc/ |
| 89 [issues]: http://dartbug.com/new | 116 [issues]: http://dartbug.com/new |
| 90 [mailinglist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum
/web-ui | 117 [mailinglist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum
/web-ui |
| 91 [devlist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/web
-ui-dev | 118 [devlist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/web
-ui-dev |
| 92 [overview]: http://www.dartlang.org/articles/dart-web-components/ | 119 [overview]: http://www.dartlang.org/articles/dart-web-components/ |
| 93 [tools]: https://www.dartlang.org/articles/dart-web-components/tools.html | 120 [tools]: https://www.dartlang.org/articles/dart-web-components/tools.html |
| 94 [spec]: https://www.dartlang.org/articles/dart-web-components/spec.html | 121 [spec]: https://www.dartlang.org/articles/dart-web-components/spec.html |
| 95 [features]: https://www.dartlang.org/articles/dart-web-components/summary.html | 122 [features]: https://www.dartlang.org/articles/dart-web-components/summary.html |
| 96 [home_page]: https://www.dartlang.org/polymer-dart/ | 123 [home_page]: https://www.dartlang.org/polymer-dart/ |
| 97 [polymer_expressions]: http://pub.dartlang.org/packages/polymer_expressions/ | 124 [polymer_expressions]: http://pub.dartlang.org/packages/polymer_expressions/ |
| 98 [polymer]: http://www.polymer-project.org/ | 125 [polymer]: http://www.polymer-project.org/ |
| OLD | NEW |