问题描述
使用polymer.dart的Dart应用程式的pubspec.yaml档案如下所示(来自):
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
entry_points
是什么意思?
推荐答案
这是一个文件,其中变压器开始寻找需要的聚合物相关文件做代码生成和其他修改。变换器遵循HTML导入和Dart脚本标记。
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.
入口点是Polymer应用程序的主要HTML文件(如 index.html
)。
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.
对于普通应用程序,您可能只有一个入口点,例如一个聚合物元素包 core_elements
或 paper_elements
为包中的每个自定义元素提供一个演示应用程序页面。每个这样的演示应用程序是一个入口点(通常在示例
文件夹而不是 web
。
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
.
这篇关于什么是dart聚合物变压器entry_points实际上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!