mirror of
https://github.com/Polymer/polymer-starter-kit.git
synced 2025-02-25 18:55:22 -06:00
Update to 3.0 pre-release toolling
This commit is contained in:
parent
0c4631a89d
commit
5203ec2227
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
bower_components/
|
|
||||||
build/
|
build/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
@ -56,7 +56,7 @@ Second, install [Bower](https://bower.io/) using [npm](https://www.npmjs.com)
|
|||||||
This command serves the app at `http://127.0.0.1:8081` and provides basic URL
|
This command serves the app at `http://127.0.0.1:8081` and provides basic URL
|
||||||
routing for the app:
|
routing for the app:
|
||||||
|
|
||||||
polymer serve --module-resolution=node --npm
|
polymer serve
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
@ -86,12 +86,12 @@ Builds will be output to a subdirectory under the `build/` directory as follows:
|
|||||||
build/
|
build/
|
||||||
es5-bundled/
|
es5-bundled/
|
||||||
es6-bundled/
|
es6-bundled/
|
||||||
es6-unbundled/
|
esm-bundled/
|
||||||
```
|
```
|
||||||
|
|
||||||
* `es5-bundled` is a bundled, minified build with a service worker. ES6 code is compiled to ES5 for compatibility with older browsers.
|
* `es5-bundled` is a bundled, minified build with a service worker. ES6 code is compiled to ES5 for compatibility with older browsers.
|
||||||
* `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.
|
* `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.
|
||||||
* `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.
|
* `esm-bundled` is a bundled, minified build with a service worker. It uses standard ES module import/export statements for browsers that support them.
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Run `polymer help build` for the full list of available options and optimization
|
|||||||
|
|
||||||
This command serves your app. Replace `build-folder-name` with the folder name of the build you want to serve.
|
This command serves your app. Replace `build-folder-name` with the folder name of the build you want to serve.
|
||||||
|
|
||||||
polymer serve --module-resolution=node --npm build/build-folder-name/
|
polymer serve build/build-folder-name/
|
||||||
|
|
||||||
### Run tests
|
### Run tests
|
||||||
|
|
||||||
|
79
polymer.json
79
polymer.json
@ -1,33 +1,74 @@
|
|||||||
{
|
{
|
||||||
"entrypoint": "index.html",
|
"entrypoint": "index.html",
|
||||||
"shell": "src/my-app.html",
|
"shell": "src/my-app.js",
|
||||||
"fragments": [
|
|
||||||
"src/my-view1.html",
|
|
||||||
"src/my-view2.html",
|
|
||||||
"src/my-view3.html",
|
|
||||||
"src/my-view404.html"
|
|
||||||
],
|
|
||||||
"sources": [
|
"sources": [
|
||||||
"images/**/*",
|
"images/**/*"
|
||||||
"src/**/*"
|
|
||||||
],
|
],
|
||||||
"extraDependencies": [
|
"extraDependencies": [
|
||||||
"bower_components/webcomponentsjs/*.js",
|
"manifest.json",
|
||||||
"!bower_components/webcomponentsjs/gulpfile.js",
|
"node_modules/@webcomponents/webcomponentsjs/*.js",
|
||||||
"manifest.json"
|
"!node_modules/@webcomponents/webcomponentsjs/gulpfile.js"
|
||||||
],
|
],
|
||||||
"lint": {
|
|
||||||
"rules": ["polymer-2"]
|
|
||||||
},
|
|
||||||
"builds": [
|
"builds": [
|
||||||
{
|
{
|
||||||
"preset": "es5-bundled"
|
"name": "esm-bundled",
|
||||||
|
"browserCapabilities": [
|
||||||
|
"es2015",
|
||||||
|
"modules"
|
||||||
|
],
|
||||||
|
"js": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"css": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"inlineScripts": false
|
||||||
|
},
|
||||||
|
"addServiceWorker": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preset": "es6-bundled"
|
"name": "es6-bundled",
|
||||||
|
"browserCapabilities": [
|
||||||
|
"es2015"
|
||||||
|
],
|
||||||
|
"js": {
|
||||||
|
"minify": true,
|
||||||
|
"transformModulesToAmd": true
|
||||||
|
},
|
||||||
|
"css": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"inlineScripts": false
|
||||||
|
},
|
||||||
|
"addServiceWorker": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preset": "es6-unbundled"
|
"name": "es5-bundled",
|
||||||
|
"js": {
|
||||||
|
"minify": true,
|
||||||
|
"compile": true,
|
||||||
|
"transformModulesToAmd": true
|
||||||
|
},
|
||||||
|
"css": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"minify": true
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"inlineScripts": false
|
||||||
|
},
|
||||||
|
"addServiceWorker": true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"npm": true
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
||||||
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||||
@ -12,18 +12,13 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
staticFileGlobs: [
|
staticFileGlobs: [
|
||||||
'bower_components/webcomponentsjs/webcomponents-loader.js',
|
|
||||||
'manifest.json',
|
'manifest.json',
|
||||||
|
'src/**/*',
|
||||||
],
|
],
|
||||||
runtimeCaching: [
|
runtimeCaching: [
|
||||||
{
|
{
|
||||||
urlPattern: /\/bower_components\/webcomponentsjs\/.*.js/,
|
urlPattern: /\/@webcomponents\/webcomponentsjs\//,
|
||||||
handler: 'fastest',
|
handler: 'fastest'
|
||||||
options: {
|
}
|
||||||
cache: {
|
|
||||||
name: 'webcomponentsjs-polyfills-cache',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user