Skip to content

Commit

Permalink
polymer 3 build
Browse files Browse the repository at this point in the history
  • Loading branch information
bkawk committed Apr 16, 2018
1 parent 0afdb58 commit 73fcd88
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ build/Release
node_modules/
jspm_packages/

# build directories
build/

# Typescript v1 declaration files
typings/

Expand Down
57 changes: 57 additions & 0 deletions build/polymer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"entrypoint": "index.html",
"shell": "src/swarm-city.js",
"fragments": [
"src/pages/terminal/page-welcome.js",
"src/pages/terminal/page-view2.js",
"src/pages/terminal/page-view3.js",
"src/pages/page-view404.js"
],
"sources": [
"src/swarm-city.js",
"images/**/*",
"package.json",
"index.html",
"src/swarm-city.js",
"src/pages/terminal/page-welcome.js",
"src/pages/terminal/page-view2.js",
"src/pages/terminal/page-view3.js",
"src/pages/page-view404.js"
],
"extraDependencies": [
"bower_components/webcomponentsjs/*.js",
"manifest.json",
"node_modules/@webcomponents/webcomponentsjs/**"
],
"builds": [
{
"name": "es6-unbundled",
"browserCapabilities": [
"es2015",
"push"
],
"js": {
"minify": true,
"compile": false
},
"css": {
"minify": true
},
"html": {
"minify": true
},
"bundle": false,
"addServiceWorker": true,
"addPushManifest": true,
"preset": "es6-unbundled"
}
],
"lint": {
"rules": [
"polymer-3"
]
},
"npm": true,
"componentDir": "node_modules/",
"moduleResolution": "node"
}
15 changes: 10 additions & 5 deletions polymer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"entrypoint": "index.html",
"shell": "src/pages/swarm-city.html",
"shell": "src/swarm-city.js",
"fragments": [
"src/pages/terminal/my-view1.js",
"src/pages/terminal/my-view2.js",
"src/pages/terminal/my-view3.js",
"src/pages/my-view404.js"
"src/pages/terminal/page-welcome.js",
"src/pages/terminal/page-view2.js",
"src/pages/terminal/page-view3.js",
"src/pages/page-view404.js"
],
"sources": [
"src/swarm-city.js",
Expand All @@ -22,6 +22,11 @@
"addServiceWorker": true
}
],
"lint": {
"rules": [
"polymer-3"
]
},
"moduleResolution": "node",
"npm": true
}
8 changes: 4 additions & 4 deletions src/swarm-city.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ class SwarmCity extends PolymerElement {
let loaded;
switch(page) {
case 'view1':
loaded = import('./page-view1.js');
loaded = import('./pages/terminal/page-welcome.js');
break;
case 'view2':
loaded = import('./page-view2.js');
loaded = import('./pages/terminal/page-view2.js');
break;
case 'view3':
loaded = import('./page-view3.js');
loaded = import('./pages/terminal/page-view3.js');
break;
case 'view404':
loaded = import('./page-view404.js');
loaded = import('./pages/page-view404.js');
break;
default:
loaded = Promise.reject();
Expand Down

0 comments on commit 73fcd88

Please sign in to comment.