|
1 | 1 | # iron-scroll-spy |
2 | 2 |
|
3 | | -An element providing a starting point for your own reusable Polymer elements. |
| 3 | +iron-scroll-spy is a container for a vertical list of elements. |
| 4 | +Specify the scroll-target and it will select the current element in the viewport as the scroll change. |
| 5 | +Change the selected attribute will result in a smooth scroll to the associated element. |
4 | 6 |
|
| 7 | +## demo & doc |
5 | 8 |
|
6 | | -## Dependencies |
| 9 | +See [component page](http://zecat.github.io/iron-scroll-spy) |
7 | 10 |
|
8 | | -Element dependencies are managed via [Bower](http://bower.io/). You can |
9 | | -install that via: |
| 11 | +## installation |
10 | 12 |
|
11 | | - npm install -g bower |
12 | | - |
13 | | -Then, go ahead and download the element's dependencies: |
14 | | - |
15 | | - bower install |
16 | | - |
17 | | - |
18 | | -## Playing With Your Element |
19 | | - |
20 | | -If you wish to work on your element in isolation, we recommend that you use |
21 | | -[Polyserve](https://github.com/PolymerLabs/polyserve) to keep your element's |
22 | | -bower dependencies in line. You can install it via: |
23 | | - |
24 | | - npm install -g polyserve |
25 | | - |
26 | | -And you can run it via: |
27 | | - |
28 | | - polyserve |
29 | | - |
30 | | -Once running, you can preview your element at |
31 | | -`http://localhost:8080/components/iron-scroll-spy/`, where `iron-scroll-spy` is the name of the directory containing it. |
32 | | - |
33 | | - |
34 | | -## Testing Your Element |
35 | | - |
36 | | -Simply navigate to the `/test` directory of your element to run its tests. If |
37 | | -you are using Polyserve: `http://localhost:8080/components/iron-scroll-spy/test/` |
38 | | - |
39 | | -### web-component-tester |
40 | | - |
41 | | -The tests are compatible with [web-component-tester](https://github.com/Polymer/web-component-tester). |
42 | | -Install it via: |
43 | | - |
44 | | - npm install -g web-component-tester |
45 | | - |
46 | | -Then, you can run your tests on _all_ of your local browsers via: |
47 | | - |
48 | | - wct |
49 | | - |
50 | | -#### WCT Tips |
51 | | - |
52 | | -`wct -l chrome` will only run tests in chrome. |
53 | | - |
54 | | -`wct -p` will keep the browsers alive after test runs (refresh to re-run). |
55 | | - |
56 | | -`wct test/some-file.html` will test only the files you specify. |
57 | | - |
58 | | - |
59 | | -## Yeoman support |
60 | | - |
61 | | -If you'd like to use Yeoman to scaffold your element that's possible. The official [`generator-polymer`](https://github.com/yeoman/generator-polymer) generator has a [`seed`](https://github.com/yeoman/generator-polymer#seed) subgenerator. |
| 13 | +``` |
| 14 | + bower i -S Zecat/iron-scroll-spy |
| 15 | +``` |
0 commit comments