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 Dec 29, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-54Lines changed: 15 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,95 +18,61 @@ The PRPL pattern, in a nutshell:
18
18
***Pre-cache** components for remaining routes
19
19
***Lazy-load** and progressively upgrade next routes on-demand
20
20
21
-
### Migrating from Polymer Starter Kit v1?
22
-
23
-
[Check out our blog post that covers what's changed in PSK2 and how to migrate!](https://www.polymer-project.org/1.0/blog/2016-08-18-polymer-starter-kit-or-polymer-cli.html)
24
-
25
-
### Quickstart
26
-
27
-
We've recorded a Polycast to get you up and running with PSK2 fast!
First, install[Polymer CLI](https://github.com/Polymer/polymer-cli) using
25
+
Install[Polymer CLI](https://github.com/Polymer/polymer-cli) using
40
26
[npm](https://www.npmjs.com) (we assume you have pre-installed [node.js](https://nodejs.org)).
41
27
42
-
npm install -g polymer-cli
43
-
44
-
Second, install [Bower](https://bower.io/) using [npm](https://www.npmjs.com)
45
-
46
-
npm install -g bower
28
+
npm install -g polymer-cli@next
47
29
48
30
##### Initialize project from template
49
31
50
32
mkdir my-app
51
33
cd my-app
52
-
polymer init polymer-2-starter-kit
34
+
polymer init polymer-3-starter-kit
53
35
54
36
### Start the development server
55
37
56
38
This command serves the app at `http://127.0.0.1:8081` and provides basic URL
57
39
routing for the app:
58
40
59
-
polymer serve
41
+
npm start
60
42
61
43
### Build
62
44
63
-
The `polymer build` command builds your Polymer application for production, using build configuration options provided by the command line or in your project's `polymer.json` file.
64
-
65
-
You can configure your `polymer.json` file to create multiple builds. This is necessary if you will be serving different builds optimized for different browsers. You can define your own named builds, or use presets. See the documentation on [building your project for production](https://www.polymer-project.org/2.0/toolbox/build-for-production) for more information.
66
-
67
-
The Polymer Starter Kit is configured to create three builds using [the three supported presets](https://www.polymer-project.org/2.0/toolbox/build-for-production#build-presets):
45
+
The `npm run build` command builds your Polymer application for production, using build configuration options provided by the command line or in your project's `polymer.json` file.
68
46
69
-
```
70
-
"builds": [
71
-
{
72
-
"preset": "es5-bundled"
73
-
},
74
-
{
75
-
"preset": "es6-bundled"
76
-
},
77
-
{
78
-
"preset": "es6-unbundled"
79
-
}
80
-
]
81
-
```
47
+
You can configure your `polymer.json` file to create multiple builds. This is necessary if you will be serving different builds optimized for different browsers. You can define your own named builds, or use presets. See the documentation on [building your project for production](https://www.polymer-project.org/3.0/toolbox/build-for-production) for more information.
82
48
83
-
Builds will be output to a subdirectory under the `build/` directory as follows:
49
+
The Polymer Starter Kit is configured to create three builds. These builds will be output to a subdirectory under the `build/` directory as follows:
84
50
85
51
```
86
52
build/
87
53
es5-bundled/
88
54
es6-bundled/
89
-
es6-unbundled/
55
+
esm-bundled/
90
56
```
91
57
92
58
*`es5-bundled` is a bundled, minified build with a service worker. ES6 code is compiled to ES5 for compatibility with older browsers.
93
-
*`es6-bundled` is a bundled, minified build with a service worker. ES6 code is served as-is. This build is for browsers that can handle ES6 code - see [building your project for production](https://www.polymer-project.org/2.0/toolbox/build-for-production#compiling) for a list.
94
-
*`es6-unbundled` is an unbundled, minified build with a service worker. ES6 code is served as-is. This build is for browsers that support HTTP/2 push.
59
+
*`es6-bundled` is a bundled, minified build with a service worker. ES6 code is served as-is. This build is for browsers that can handle ES6 code - see [building your project for production](https://www.polymer-project.org/3.0/toolbox/build-for-production#compiling) for a list.
60
+
*`esm-bundled` is a bundled, minified build with a service worker. It uses standard ES module import/export statements for browsers that support them.
95
61
96
-
Run `polymer help build` for the full list of available options and optimizations. Also, see the documentation on the [polymer.json specification](https://www.polymer-project.org/2.0/docs/tools/polymer-json) and [building your Polymer application for production](https://www.polymer-project.org/2.0/toolbox/build-for-production).
62
+
Run `polymer help build` for the full list of available options and optimizations. Also, see the documentation on the [polymer.json specification](https://www.polymer-project.org/3.0/docs/tools/polymer-json) and [building your Polymer application for production](https://www.polymer-project.org/3.0/toolbox/build-for-production).
97
63
98
64
### Preview the build
99
65
100
66
This command serves your app. Replace `build-folder-name` with the folder name of the build you want to serve.
101
67
102
-
polymer serve build/build-folder-name/
68
+
npm start build/build-folder-name/
103
69
104
70
### Run tests
105
71
106
72
This command will run [Web Component Tester](https://github.com/Polymer/web-component-tester)
107
73
against the browsers currently installed on your machine:
108
74
109
-
polymer test
75
+
npm test
110
76
111
77
If running Windows you will need to set the following environment variables:
112
78
@@ -115,11 +81,6 @@ If running Windows you will need to set the following environment variables:
115
81
116
82
Read More here [daffl/launchpad](https://github.com/daffl/launchpad#environment-variables-impacting-local-browsers-detection)
117
83
118
-
### Adding a new view
84
+
---
119
85
120
-
You can extend the app by adding more views that will be demand-loaded
121
-
e.g. based on the route, or to progressively render non-critical sections of the
122
-
application. Each new demand-loaded fragment should be added to the list of
123
-
`fragments` in the included `polymer.json` file. This will ensure those
124
-
components and their dependencies are added to the list of pre-cached components
125
-
and will be included in the build.
86
+
Looking for our older PSK2 Polycast or migration blog post? See [the previous README](https://github.com/Polymer/polymer-starter-kit/blob/v3.2.1/README.md).
0 commit comments