Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Jul 25, 2016
1 parent 5cf1987 commit 1d7e03c
Show file tree
Hide file tree
Showing 13 changed files with 825 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
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
37 changes: 37 additions & 0 deletions app.yaml
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
22 changes: 22 additions & 0 deletions bower.json
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"
}
}
58 changes: 58 additions & 0 deletions index.html
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>
17 changes: 17 additions & 0 deletions manifest.json
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"
}
9 changes: 9 additions & 0 deletions polymer.json
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"
]
}
10 changes: 10 additions & 0 deletions service-worker.js
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.');
13 changes: 13 additions & 0 deletions src/lazy-resources.html
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">
Loading

0 comments on commit 1d7e03c

Please sign in to comment.