Skip to content

Commit

Permalink
fix comment in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jun 21, 2017
1 parent c56e49f commit a264029
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This repository contains four elements:
* [y-array](//y-js.org/y-element/components/y-element/#y-array) - Creates an array type. It exports the data as a shared javascript array
* [y-type](//y-js.org/y-element/components/y-element/#y-type) - Configuration for any Yjs type. It exports the Yjs type


##### Simple Yjs example in Javascript
```
Y({
Expand All @@ -31,10 +32,6 @@ Y({

##### Same example in Polymer
```
<link rel="import" href="../bower_components/y-element/y-element.html">
<script src="../bower_components/yjs/y.js"></script>
<script src="../bower_components/y-map/y-map.js"></script>
<y-element
db-name="memory"
connector-name="websockets-client"
Expand All @@ -44,10 +41,24 @@ Y({
```

### Before you start
Before you start remember to install all y-* you want to use. In particular you need to install a connector (e.g. `y-websockets-client`), a database adapter (e.g. `y-memory`), and all types you want to use.
Before you start remember to install all y-* modules you want to use.
In particular you need to install a connector (e.g. `y-websockets-client`), and
a database adapter (e.g. `y-memory`).

```
bower i --save y-element yjs y-map y-memory y-websockets-client
bower i --save y-element yjs y-map y-array y-memory y-websockets-client
```

&lt;y-element&gt;@>2.0.0 no longer supports automatic module finding. You need to explicitly include all y-* modules!

```html
<script src="../bower_components/yjs/y.js"></script>
<script src="../bower_components/y-map/y-map.js"></script>
<script src="../bower_components/y-array/y-array.js"></script>
<script src="../bower_components/y-memory/y-memory.js"></script>
<script src="../bower_components/y-websockets-client/y-websockets-client.js"></script>

<link rel="import" href="../bower_components/y-element/y-element.html">
```

## Contribute
Expand Down
1 change: 0 additions & 1 deletion y-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<script src="../bower_components/y-memory/y-memory.js"></script>
<script src="../bower_components/y-websockets-client/y-websockets-client.js"></script>
<!-- load y-element after including y.js -->
<link rel="import" href="../bower_components/y-element/y-element.html">
```
Expand Down

0 comments on commit a264029

Please sign in to comment.