stevenlee / polymer-starter-kit-plus

An improved starting point for Polymer Apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polymer Starter Kit Plus

An improved starting point for building web applications with Polymer 1.x

Polymer Starter Kit Plus is improved version of Polymer Starter Kit

Included out of the box:

Getting Started

To take advantage of Polymer Starter Kit Plus you need to:

  1. Get a copy of the code.
  2. Install the dependencies if you don't already have them.
  3. Modify the application to your liking.
  4. Deploy your production code.

Get the code

Download and extract Polymer Starter Kit Plus to where you want to work.

Or git clone

Updating from previous version

If you've previously downloaded a copy of the full Starter Kit and would like to update to the latest version, here's a git workflow for doing so:

git init
git checkout -b master
git add .
git commit -m 'Check-in 1.0.1'
git remote add upstream https://github.com/polymerelements/polymer-starter-kit.git
git fetch upstream
git merge upstream/master
# resolve the merge conflicts in your editor
git add . -u
git commit -m 'Updated to 1.0.2'

Install dependencies

Quick-start (for experienced users)

With Node.js installed, run the following one liner from the root of your Polymer Starter Kit Plus download:

npm install -g gulp bower && npm install && bower install

Prerequisites (for everyone)

The full starter kit requires the following major dependencies:

  • Node.js, used to run JavaScript tools from the command line.
  • npm, the node package manager, installed with Node.js and used to install Node.js packages.
  • gulp, a Node.js-based build tool.
  • bower, a Node.js-based package manager used to install front-end packages (like Polymer).

To install dependencies:

  1. Check your Node.js version.
node --version

The version should be at or above 0.12.x.

  1. If you don't have Node.js installed, or you have a lower version, go to nodejs.org and click on the big green Install button.

  2. Install gulp and bower globally.

npm install -g gulp bower

This lets you run gulp and bower from the command line.

  1. Install the starter kit's local npm and bower dependencies.
cd polymer-starter-kit && npm install && bower install

This installs the element sets (Paper, Iron, Platinum) and tools the starter kit requires to build and serve apps.

Development workflow

Serve / watch

gulp serve

This outputs an IP address you can use to locally test and another that can be used on devices connected to your network.

Run tests

gulp test:local

This runs the unit tests defined in the app/test directory through web-component-tester.

Build & Vulcanize

gulp

Build and optimize the current project, ready for deployment. This includes linting as well as vulcanization, image, script, stylesheet and HTML optimization and minification.

Service Worker

Polymer Starter Kit Plus offers an offline experience thanks to Service Worker and the Platinum Service Worker elements. New to Service Worker? Read the following introduction to understand how it works.

About

An improved starting point for Polymer Apps

License:Other


Languages

Language:HTML 69.4%Language:JavaScript 29.0%Language:CSS 1.6%