Skip to content

Commit

Permalink
initial commit on dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
isorna committed Aug 23, 2016
1 parent 9382780 commit 30789fc
Show file tree
Hide file tree
Showing 25 changed files with 850 additions and 758 deletions.
87 changes: 25 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,38 @@
# Polymer App Toolbox - Drawer Template
# \<polymerday\>

This template is a starting point for building apps using a drawer-based
layout. The layout is provided by `app-layout` elements.
PolymerDay Madrid

This template, along with the `polymer-cli` toolchain, also demonstrates use
of the "PRPL pattern" This pattern allows fast first delivery and interaction with
the content at the initial route requested by the user, along with fast subsequent
navigation by pre-caching the remaining components required by the app and
progressively loading them on-demand as the user navigates through the app.
## Install the Polymer-CLI

The PRPL pattern, in a nutshell:
First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your application locally.

* **Push** components required for the initial route
* **Render** initial route ASAP
* **Pre-cache** components for remaining routes
* **Lazy-load** and progressively upgrade next routes on-demand
## Viewing Your Application

### Setup
```
$ polymer serve
```

##### Prerequisites
## Building Your Application

Install [polymer-cli](https://github.com/Polymer/polymer-cli):
```
$ polymer build
```

npm install -g polymer-cli
This will create a `build/` folder with `bundled/` and `unbundled/` sub-folders
containing a bundled (Vulcanized) and unbundled builds, both run through HTML,
CSS, and JS optimizers.

##### Initialize project from template
You can serve the built versions by giving `polymer serve` a folder to serve
from:

mkdir my-app
cd my-app
polymer init app-drawer-template
```
$ polymer serve build/bundled
```

### Start the development server

This command serves the app at `http://localhost:8080` and provides basic URL
routing for the app:

polymer serve


### Build

This command performs HTML, CSS, and JS minification on the application
dependencies, and generates a service-worker.js file with code to pre-cache the
dependencies based on the entrypoint and fragments specified in `polymer.json`.
The minified files are output to the `build/unbundled` folder, and are suitable
for serving from a HTTP/2+Push compatible server.

In addition the command also creates a fallback `build/bundled` folder,
generated using fragment bundling, suitable for serving from non
H2/push-compatible servers or to clients that do not support H2/Push.

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

### Extend

You can extend the app by adding more elements that will be demand-loaded
e.g. based on the route, or to progressively render non-critical sections
of the application. Each new demand-loaded fragment should be added to the
list of `fragments` in the included `polymer.json` file. This will ensure
those components and their dependencies are added to the list of pre-cached
components (and will have bundles created in the fallback `bundled` build).
## Running Tests

```
$ polymer test
```

Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
38 changes: 24 additions & 14 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
{
"name": "app-drawer-template",
"name": "polymerday",
"description": "PolymerDay Madrid",
"main": "index.html",
"keywords": [
"polymer",
"polymerday",
"madrid"
],
"authors": [
"The Polymer Authors"
"Carlos Cañado <[email protected]>",
"Manu Fosela <[email protected]>",
"Jorge del Casar <[email protected]>",
"Alvaro Isorna <[email protected]>"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"private": true,
"dependencies": {
"app-layout": "polymerelements/app-layout#^0.9.0",
"app-route": "polymerelements/app-route#^0.9.1",
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.3.0",
"iron-icon": "polymerelements/iron-icon#^1.0.0",
"iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
"iron-localstorage": "polymerelements/iron-localstorage#^1.0.0",
"iron-media-query": "polymerelements/iron-media-query#^1.0.0",
"iron-pages": "polymerelements/iron-pages#^1.0.0",
"iron-selector": "polymerelements/iron-selector#^1.0.0",
"paper-tabs": "PolymerElements/paper-tabs#~1.6.2",
"paper-icon-button": "PolymerElements/paper-icon-button#~1.1.1",
"polymer": "polymer/polymer#^1.4.0"
"polymer": "polymer/polymer#^1.4.0",
"platinum-sw": "polymerelements/platinum-sw#^1.3.0",
"iron-flex-layout": "polymerelements/iron-flex-layout#^1.3.1",
"paper-styles": "PolymerElements/paper-styles#^1.1.4"
},
"devDependencies": {
"web-component-tester": "^4.0.0"
Expand Down
20 changes: 8 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

<title>Polymer Day</title>
<title>PolymerDay</title>

<link rel="shortcut icon" sizes="32x32" href="/images/app-icon-32.png">

<meta name="theme-color" content="#fff">
<meta name="theme-color" content="#FFF">
<link rel="manifest" href="/manifest.json">

<link href="https://fonts.googleapis.com/css?family=Lato:400,100" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet" type="text/css">

<script>

// setup Polymer options
Expand Down Expand Up @@ -42,24 +39,23 @@

</script>

<link rel="import" href="/src/view-app.html">
<link rel="import" href="/src/polymerday-app/polymerday-app.html">

<style>

body {
margin: 0;
font-family: 'Lato', sans-serif;
font-family: 'Roboto', 'Noto', sans-serif;
line-height: 1.5;
min-height: 100vh;
background-color: #fff;
height: 100vh;
background-color: #FFF;
color: #295DA4;
}

</style>

</head>
<body>

<view-app></view-app>
<polymerday-app></polymerday-app>

</body>
</html>
51 changes: 26 additions & 25 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
{
"name": "My App",
"short_name": "My App",
"icons": [{
"src": "images/app-icon-32.png",
"type": "image/png",
"sizes": "32x32"
}, {
"src": "images/app-icon.svg",
"sizes": "128x128",
"type": "image/svg"
}, {
"src": "images/app-icon-144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "images/app-icon.svg",
"sizes": "192x192",
"type": "image/svg"
},{
"src": "images/app-icon.svg",
"sizes": "384x384",
"type": "image/svg"
}],
"name": "polymerday",
"short_name": "polymerday",
"description": "PolymerDay Madrid",
"icons": [{
"src": "images/app-icon-32.png",
"type": "image/png",
"sizes": "32x32"
}, {
"src": "images/app-icon.svg",
"sizes": "128x128",
"type": "image/svg"
}, {
"src": "images/app-icon-144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "images/app-icon.svg",
"sizes": "192x192",
"type": "image/svg"
},{
"src": "images/app-icon.svg",
"sizes": "384x384",
"type": "image/svg"
}],
"start_url": "/",
"display": "standalone",
"background_color": "#3f51b5",
"theme_color": "#3f51b5"
"background_color": "#FFF",
"theme_color": "#295DA4"
}
9 changes: 0 additions & 9 deletions polymer.json

This file was deleted.

9 changes: 0 additions & 9 deletions service-worker.js
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
/**
* @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.info('Service worker disabled for development, will be generated at build time.');
21 changes: 0 additions & 21 deletions src/my-icons.html

This file was deleted.

Binary file added src/polymerday-app/images/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/polymerday-app/images/logo_polymerday.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/polymerday-app/images/side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 30789fc

Please sign in to comment.