Polymer Template

A starting point for building web applications with Polymer 1.0 and GopherJS

Get the code

Visit (https://github.com/PalmStoneGames/polymer-template/) and fetch the Polymer Template.

Install dependencies

Quick-start (for experienced users)

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

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

Prerequisites (for everyone)

Polymer template requires the following 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).
  • go, the programming language
  • gopherJS, a compiler for Go to Javascript

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 local npm and bower dependencies.
cd polymer-template && npm install && bower install

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

  1. Download and install the Go programming language.

Please follow the instructions for your system at https://golang.org/doc/install

  1. Grab the GopherJS compiler.
go get -u github.com/gopherjs/gopherjs

Build

Build the current project, for development and testing.

gulp build:dev && go build ./...

Build and optimize the current project, ready for deployment.

gulp build:prod && go build ./...

Dependency Management

Polymer uses Bower for package management. This makes it easy to keep your elements up to date and versioned. For tooling, we use npm to manage Node.js-based dependencies.