-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
825 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
# news | ||
# NEWS | ||
|
||
### Setup | ||
|
||
##### Prerequisites | ||
|
||
Install [polymer-cli](https://github.com/Polymer/polymer-cli): | ||
(Need at least npm v0.3.0) | ||
|
||
npm install -g polymer-cli | ||
|
||
|
||
##### Setup | ||
|
||
git clone https://github.com/frankiefu/news.git | ||
cd shop | ||
bower install | ||
|
||
### Start the development server | ||
|
||
polymer serve | ||
|
||
### Run web-component-tester tests | ||
|
||
polymer test | ||
|
||
### Build | ||
|
||
polymer build | ||
|
||
### Test the build | ||
|
||
This command serves the minified version of the app in an unbundled state, as it would be served by a push-compatible server: | ||
|
||
polymer serve build/unbundled | ||
|
||
This command serves the minified version of the app generated using fragment bundling: | ||
|
||
polymer serve build/bundled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
application: news | ||
version: 1 | ||
runtime: python27 | ||
api_version: 1 | ||
threadsafe: yes | ||
|
||
handlers: | ||
- url: /bower_components | ||
static_dir: bower_components | ||
secure: always | ||
|
||
- url: /data | ||
static_dir: data | ||
secure: always | ||
|
||
- url: /images | ||
static_dir: images | ||
secure: always | ||
|
||
- url: /src | ||
static_dir: src | ||
secure: always | ||
|
||
- url: /service-worker.js | ||
static_files: service-worker.js | ||
upload: service-worker.js | ||
secure: always | ||
|
||
- url: /manifest.json | ||
static_files: manifest.json | ||
upload: manifest.json | ||
secure: always | ||
|
||
- url: /.* | ||
static_files: index.html | ||
upload: index.html | ||
secure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "NEWS", | ||
"version": "1.0", | ||
"authors": [ | ||
"The Polymer Authors" | ||
], | ||
"private": true, | ||
"dependencies": { | ||
"polymer": "polymer/polymer#^1.4.0", | ||
"app-layout": "polymerelements/app-layout#^0.10.0", | ||
"app-route": "polymerelements/app-route#^0.9.1", | ||
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", | ||
"iron-icon": "polymerelements/iron-icon#^1.0.0", | ||
"iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", | ||
"iron-pages": "polymerelements/iron-pages#^1.0.0", | ||
"iron-selector": "polymerelements/iron-selector#^1.0.0", | ||
"paper-icon-button": "polymerelements/paper-icon-button#^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"web-component-tester": "^4.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2016 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 | ||
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 | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
|
||
<title>NEWS</title> | ||
|
||
<link rel="shortcut icon" sizes="32x32" href="/images/news-icon-32.png"> | ||
<meta name="theme-color" content="#000"> | ||
<link rel="manifest" href="/manifest.json"> | ||
|
||
<link rel="import" href="/src/news-app.html" async> | ||
|
||
<style> | ||
|
||
body { | ||
margin: 0; | ||
font-family: 'Roboto', 'Noto', sans-serif; | ||
min-height: 100vh; | ||
} | ||
|
||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<news-app unresolved></news-app> | ||
|
||
<script> | ||
Polymer = {lazyRegister: true, dom: 'shadow'}; | ||
|
||
(function() { | ||
if ('registerElement' in document | ||
&& 'import' in document.createElement('link') | ||
&& 'content' in document.createElement('template')) { | ||
// platform is good! | ||
} else { | ||
// polyfill the platform! | ||
var e = document.createElement('script'); | ||
e.src = '/bower_components/webcomponentsjs/webcomponents-lite.min.js'; | ||
document.body.appendChild(e); | ||
} | ||
})(); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "NEWS", | ||
"short_name": "NEWS", | ||
"icons": [{ | ||
"src": "images/news-icon-128.png", | ||
"sizes": "128x128", | ||
"type": "image/png" | ||
}, { | ||
"src": "images/news-icon-192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}], | ||
"start_url": "/", | ||
"background_color": "#000", | ||
"display": "standalone", | ||
"theme_color": "#000" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"entrypoint": "index.html", | ||
"shell": "src/news-app.html", | ||
"fragments": [ | ||
"src/news-list.html", | ||
"src/news-article.html", | ||
"src/lazy-resources.html" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2016 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 | ||
* 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 | ||
* Code distributed by Google as part of the polymer project is also | ||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
console.log('Service worker disabled for development, will be generated at build time.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2016 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 | ||
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 | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
|
||
<link rel="import" href="../bower_components/app-layout/app-drawer/app-drawer.html"> | ||
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html"> | ||
<link rel="import" href="news-icons.html"> |
Oops, something went wrong.