Dart apps using polymer.dart have their pubspec.yaml file looking like this (from the Polymer.dart Code Lab):
name: polymer_and_dart
description: Sample app built with the polymer.dart package
environment:
sdk: '>=1.2.0 <2.0.0'
dependencies:
polymer: '>=0.12.0 <0.13.0'
dev_dependencies:
unittest: '>=0.10.0 <0.11.0'
transformers:
- polymer:
entry_points:
- web/begin/index.html
- web/end/index.html
What do the entry_points
actually mean? What does declaring an entry point actually do?
This is the file where the transformer starts looking for polymer related files where it needs to do code generation and other modifications. The transformer follows HTML imports and Dart script tags.
An entry point is the main HTML files of a Polymer application (like index.html
). Other files like custom elements are found automatically through imports.
For normal applications you might have only one entry point but for example a package of polymer elements like core_elements
or paper_elements
have a demo application page for each custom element in the package. Each such demo application is an entry point (normally in the example
folder instead of web
.
From the Building part of Polymer.dart page:
You can use
entry_points
to specify which pages under web the user can navigate to. (By default, all pages under web are entry points.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With