This repo goes with the Build your first Polymer 3 element codelab.
You'll need to install some command-line tools to manage dependencies and to run the demo.
-
Download and install Node(recommends v8.10.0) from https://nodejs.org/. Node includes the node package manager command,
npm
. -
Clone this repo:
https://github.com/Polymer-Japan/polymer3-first-element.git
-
Change directory to your local repo and install dependencies with
npm
:cd polymer3-first-elements npm install
-
To preview your element, run
npm start
from the repo directory:npm start
Open
localhost:8081/components/icon-toggle/demo/
in your browser. (Note that the path usesicon-toggle
—the component name listed in this element'spackage.json
file—rather than the actual directory name.)
npm start
calls polymer serve
.
If you're wondering what polymer serve
does, see Run tests interactively
in the Polymer docs.