You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: app/3.0/docs/glossary.md
+55-82
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,11 @@ title: "Polymer Glossary"
4
4
5
5
<!-- toc -->
6
6
7
-
<div>
8
-
{% include 'outdated.html' %}
9
-
</div>
10
-
11
7
## A
12
8
13
-
### Analyzer
14
-
See [Polymer Analyzer](#polymer-analyzer).
9
+
### AMD modules
10
+
11
+
AMD modules are loaded by a web browser using a small library. This means AMD modules can be used with browsers that don't support native ES modules. You can configure your [Polymer CLI](#polymer-cli) build settings to convert ES modules to AMD modules.
15
12
16
13
### app shell
17
14
In a progressive web app, the app shell contains the CSS, HTML and JavaScript that implements the
@@ -24,49 +21,35 @@ See [Instant Loading Web Apps with an Application Shell
24
21
Architecture](https://developers.google.com/web/updates/2015/11/app-shell) for more information.
25
22
26
23
## B
24
+
27
25
### Bower
28
-
Bower is a package manager for web projects. Bower automates the installation of packages like
29
-
custom elements and JavaScript libraries. Polymer distributes its core library and elements via
30
-
Bower. See [bower.io](https://bower.io) for more information.
31
26
32
-
### bower.json
33
-
`bower.json` is a manifest used by Bower for configuring packages for use as dependencies. See [the
34
-
`bower.json` specification](https://github.com/bower/spec/blob/master/json.md) for more information.
27
+
Bower is a package manager for web projects. Bower automates the installation of packages like custom elements and JavaScript libraries. Polymer 1.x and 2.x distribute their core library and elements via Bower. See [bower.io](https://bower.io) for more information.
28
+
29
+
In Polymer 3.0, [npm](#npm) replaces Bower as a package manager.
35
30
36
-
## C
37
-
### crisper
38
-
crisper extracts inline scripts from an HTML file. crisper is useful for separating JavaScript from
39
-
HTML in order to deploy in an environment that uses CSP (Content Security Policy).
31
+
### bundling
32
+
33
+
Bundling concatenates an app's scripts and resources to reduce the number of network requests it takes to load dependencies.
34
+
35
+
By contrast, if both server and browser support HTTP/2 (a newer protocol that permits concurrent resource requests), it can be acceptable to leave resources unbundled. Unbundled builds permit lazy loading of dynamic dependencies. By default, Polymer apps are unbundled.
40
36
41
37
## D
42
38
### dependency
43
39
44
40
*dependency* may refer to:
45
41
46
-
* A package dependency, such as a Bower or npm package that your project uses.
42
+
* A package dependency, such as an npm package that your project uses.
47
43
* A specific resource that is required by another, such as HTML files or JavaScript libraries. See
* A data dependency in the context of the Polymer data system: a piece of data that an observer,
51
47
computed property or computed binding depends on.
52
48
53
-
### dependency variants
54
-
55
-
Dependency variants are named sets of Bower [package dependencies](#dependency) at specific
56
-
versions which are different (usually more specific) than the default dependencies. Variants are
57
-
specified in [`bower.json`](#bower-json).
49
+
### dynamic import()
50
+
A [dynamic JavaScript `import()` statement](#https://developers.google.com/web/updates/2017/11/dynamic-import) loads a module. In contrast to static [import](#import) statements, dynamic imports load based on code execution, and can take a computed string.
58
51
59
-
Dependency variants are useful for testing elements against different versions of Polymer and other
60
-
elements, where [`bower.json`](#bower-json) would normally only let you install and test against
61
-
one version.
62
-
63
-
If you run `polymer install --variants`, the `polymer install` tool creates separate builds for
64
-
your element using the versions of Polymer you specify. You can use the [Polymer development
65
-
server](#polyserve) to test these variants.
66
-
67
-
### dynamic dependency
68
-
A dynamic dependency is a dependency that is imported at runtime, using a mechanism such as
The Polymer 3.0 build tools will find your dynamic imports and include them in your build if you use string literals to identify them.
70
53
71
54
## E
72
55
### eager loading
@@ -78,24 +61,34 @@ The HTML actually loaded by the browser to start the application. Usually `index
78
61
application built with an [app shell](#app-shell) architecture, the entrypoint is loaded for many
79
62
different URLs.
80
63
64
+
### ES (ES5, ES6/ES2015)
65
+
66
+
ECMAScript. A specification created to standardize JavaScript.
67
+
68
+
ES5 and ES6 (ES2015) are editions of ECMAScript; ES6 adds features to ES5, such as [imports](#import).
69
+
70
+
The Web Components standards and the Polymer library are based on ES modules, a JavaScript feature added in ES6. Unlike AMD modules, which must be loaded with a library, ES modules are available natively in modern browsers. You can configure the [Polymer CLI](#polymer-cli) build tools to compile your code so that older browsers can still run your app.
71
+
72
+
### ES modules
73
+
74
+
ES modules use JavaScript `import` to load bindings that have been `export`ed by another ES module. Polymer uses ES modules to package the features of the Polymer library and load their dependencies.
75
+
81
76
## F
82
77
### fragment
83
-
Fragments are used to define bundles and are often associated with routes or non-critical
84
-
resources. A fragment is a lazily-loaded HTML file.
78
+
Fragments are resources, such as custom element definitions, that are only loaded if the user follows a route that requires them. Fragments can be used by a bundler to identify resources that should be packaged together.
85
79
86
80
## G
87
81
### git
88
-
A distributed version control system. Bower depends on git to install components from their GitHub
89
-
repositories.
82
+
A distributed version control system.
90
83
91
84
### gulp
92
85
A streamed JavaScript task runner that can be used to set up a custom build process using the
93
86
[`polymer-build` library](#polymer-build).
94
87
95
-
## H
96
-
### hydrolysis
97
-
This tool has been replaced by [Polymer Analyzer](#polymer-analyzer). It is a static analysis
98
-
framework for Web Components.
88
+
## I
89
+
### import
90
+
91
+
The [JavaScript `import` statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) loads an ES module. Polymer 3.0 uses `import` statements to load the Polymer library, utilities and elements. `import` is an [ES6](#es6) feature.
99
92
100
93
## L
101
94
### lazy loading
@@ -107,10 +100,7 @@ app](https://github.com/Polymer/shop). In the Shop app, views are elements which
107
100
only when they are routed to.
108
101
109
102
### linter
110
-
A linter is a piece of software that analyzes code for suspicious-looking constructions that can
111
-
potentially cause errors; for example, for example, registering an element without specifying its
112
-
tag name, or using invalid data-binding syntax. The Polymer tools include [`Polymer
113
-
Linter`](#polymer-linter), which does this for Polymer apps and elements.
103
+
A linter analyzes source code and warns you about possible errors. Polymer CLI includes [`Polymer Linter`](#polymer-linter).
114
104
115
105
## M
116
106
### monolithic
@@ -119,75 +109,65 @@ architecture or dynamic code loading.
119
109
120
110
## N
121
111
### Node.js
122
-
An event-driven JavaScript runtime environment. The [Polymer CLI](#polymer-cli) and [bower](#bower)
123
-
are both built on Node. For more information, visit [nodejs.org](https://nodejs.org).
112
+
An environment for writing JavaScript applications and server-side code. Works with a package manager, npm. [Polymer CLI](#polymer-cli) and the Polymer Elements
113
+
are built on Node. For more information, visit [nodejs.org](https://nodejs.org).
124
114
125
115
### npm
126
-
Package management system for [Node.js](#node-js).
116
+
npm is a package manager for [Node.js](#node-js). The Polymer library and core elements are distributed via npm.
127
117
128
118
## P
129
119
### package.json
130
120
A metadata file used by [npm](#npm) to manage project dependencies.
131
121
132
122
### Polymer CLI
133
-
A command line tool for Polymer projects. The Polymer CLI has a number of tools for working with
123
+
A command line tool for Polymer projects. Polymer CLI has a number of tools for working with
134
124
Polymer and Web Components. For more information, see the [Polymer CLI documentation](/{{{polymer_version_dir}}}/docs/tools/polymer-cli).
135
125
136
-
#### `polymer build`
137
-
This command builds your project with a preconfigured build pipeline. It calls `polymer-build` with
138
-
options configured for a build suitable for an [app shell](#app-shell) app.
126
+
#### `polymer build` {#build-command}
139
127
140
-
To customize your build pipeline, you can use `polymer-build` itself in conjunction with other
141
-
build tools.
128
+
Polymer CLI command. Takes a build configuration from command line options, or from a [polymer.json file](#polymer-json), and packages your app for deployment on a web server.
129
+
130
+
`polymer build` is a convenient wrapper for the [`polymer-build`](#polymer-build) library. Use the `polymer-build` library itself if you need greater customization of your build process.
142
131
143
132
#### `polymer init`
144
133
Initializes a Polymer project. Contains a set of starter templates for elements and apps.
145
134
146
135
#### `polymer install`
147
-
Install command for Polymer apps. Installs [Bower](#bower) dependencies, equivalent to running
148
-
`bower install`. With the option `--variants`, also installs any [dependency
149
-
variants](#dependency-variants) specified in the `variants` property of [`bower.json`](#bower-json).
136
+
Calls `npm install`.
150
137
151
138
#### `polymer lint`
152
-
Invokes[`polymer-linter`](#polymer-linter) to [lint](#linter) a polymer project.
139
+
Calls[`polymer-linter`](#polymer-linter) to analyze your code for potential problems.
153
140
154
141
#### `polymer serve`
155
142
This command starts [`polyserve`](#polyserve), a simple development server for Web Components.
156
143
157
144
#### `polymer test`
158
145
Runs tests for your Polymer app with [`web-component-tester`](#web-component-tester).
159
146
160
-
### polymer-build
161
-
`polymer-build` is a library for building Polymer projects. `polymer-build` allows you to
162
-
completely customize your build and combine additional streams and build tasks in any order.
147
+
### Polymer Analyzer
148
+
A static analysis tool for Web Components. Used by the tools in Polymer CLI to parse your code. For more information, see the [README](https://github.com/Polymer/tools/tree/master/packages/analyzer).
163
149
164
-
Compare the `polymer build` command, which calls `polymer-build` with preconfigured options.
150
+
### polymer-build
151
+
`polymer-build` is a library for building Polymer projects. `polymer-build` allows you to completely customize your build process and integrate it with other tools. For more information, see the the [README](https://github.com/Polymer/tools/tree/master/packages/build).
165
152
166
153
### Polymer Bundler
167
154
Polymer build tool that follows HTML Imports and `<script>` tags to concatenate resources into a
168
155
single page for production. Can improve performance by reducing network trips.
169
156
170
157
### Polymer Linter
171
-
[Linter](#linter) invoked by `polymer lint` command. Lints a Polymer project.
172
-
173
-
### Polymer Analyzer
174
-
A static analysis framework for web applications.
158
+
[Linter](#linter) invoked by `polymer lint` command. Warns you about potential problems in your Polymer code-for example, data binding with a property that doesn't exist, or using deprecated CSS selectors. For more information, see the [README](https://github.com/Polymer/tools/tree/master/packages/linter).
175
159
176
-
### `polymer.json`
177
-
`polymer.json` is the Polymer build configuration file. It lets you configure your app’s entrypoint
178
-
and app shell files, instead of passing these as parameters to polymer build.
160
+
### `polymer.json` {#polymer-json}
161
+
Configuration file. Sets options for how Polymer CLI tools should interact with your project, and defines the output of the `polymer build` command. Use polymer.json to create one or more build configurations, and to specify the locations of source files, data files, and extra dependencies.
179
162
180
-
`polymer.json` also lets you specify the locations of source files, HTML fragments and additional
181
-
dependencies, and configure the [Polymer linter](#polymer-linter).
182
-
183
-
### `polyserve`
184
-
`polyserve` is a locally-installable web server for developing [Bower](#bower) components.
163
+
### progressive web app
164
+
A progressive web app (PWA) is a reliable, fast web site that works seamlessly on mobile, tablet and desktop. A PWA has the look-and-feel of a native application and delivers content when offline, but is served over HTTPS via any modern web browser.
185
165
186
166
## R
187
167
### routing
188
168
Routing is the process an app uses to determine how to respond to a client request for a particular
189
169
endpoint. A default route is the endpoint the app directs the user to when no route is specified.
190
-
In a PWA, the [app shell](#app-shell) performs routing.
170
+
In a progressive web app, the [app shell](#app-shell) performs routing.
191
171
192
172
## S
193
173
### service worker
@@ -218,13 +198,6 @@ dependency of file A.
218
198
The *transitive dependencies* of a resource are all the dependencies, direct and indirect, that a
219
199
resource depends on.
220
200
221
-
## V
222
-
### variant
223
-
See [dependency variant](#dependency-variant).
224
-
225
-
### vulcanize
226
-
This tool has been replaced by [Polymer Bundler](#polymer-bundler).
227
-
228
201
## W
229
202
### web-component-tester
230
203
A browser-based testing environment for web components. Runs your tests in local browsers or
0 commit comments