This repo goes with the Build your first Polymer element codelab.
The codelab is designed to be used with Chrome Dev Editor. See the next section if you'd like to use another editor for the codelab.
If you're not using CDE, you'll need to install some command-line tools to manage dependencies and to run the demo.
-
Download and install Node from https://nodejs.org/. Node includes the node package manager command,
npm. -
Install
bowerandpolyserve:npm install -g bower polymer-cli -
Clone this repo:
https://github.com/googlecodelabs/polymer-first-elements.git -
Change directory to your local repo and install dependencies with
bower:cd polymer-first-elements bower install -
To preview your element, run
polymer servefrom the repo directory:polymer serveOpen
localhost:8080/components/icon-toggle/demo/in your browser. (Note that the path usesicon-toggle—the component name listed in this element'sbower.jsonfile—rather than the actual directory name.)
If you're wondering what polymer serve does, see Testing elements with local bower dependencies
in the Polymer docs.