Skip to content

Commit 99c70bd

Browse files
committed
Merge pull request #104 from afeld/next-release
v2.0.0
2 parents 2512216 + 2abc808 commit 99c70bd

File tree

5 files changed

+31
-50
lines changed

5 files changed

+31
-50
lines changed

CHANGELOG.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Backbone-Nested [![Build Status](https://secure.travis-ci.org/afeld/backbone-nested.png?branch=master)](http://travis-ci.org/afeld/backbone-nested)
22

3-
A plugin to make [Backbone.js](http://documentcloud.github.com/backbone) keep track of nested attributes. [Download minified version](https://github.com/afeld/backbone-nested/downloads).
3+
A plugin to make [Backbone.js](http://documentcloud.github.com/backbone) keep track of nested attributes. Download the latest version and see the changelog/history/release notes on the [Releases](https://github.com/afeld/backbone-nested/releases) page. **Supports Backbone 0.9.x and 1.x.**
44

55
## The Need
66

@@ -28,18 +28,35 @@ Wouldn't it be awesome if you could do this?
2828
user.bind('change:name.first', function(){ ... });
2929
```
3030

31-
## Usage
31+
## Installation
32+
33+
### [Bower](http://bower.io/)
34+
35+
Recommended.
36+
37+
1. Install the latest version:
38+
39+
```bash
40+
bower install backbone backbone-nested-model jquery underscore --save
41+
```
3242

33-
1. Download the latest version [here](https://github.com/afeld/backbone-nested/tags), and add `backbone-nested.js` to your HTML `<head>`, **after** `backbone.js` is included ([tested](http://afeld.github.com/backbone-nested/test/) against [jQuery](http://jquery.com/) v1.7.2, [Underscore](http://documentcloud.github.com/underscore/) v1.3.3 and [Backbone](http://documentcloud.github.com/backbone/) v0.9.2).
43+
2. Add `backbone-nested.js` to your HTML `<head>`:
3444

3545
```html
36-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
37-
<script type="text/javascript" src="underscore.js"></script>
38-
<script type="text/javascript" src="backbone.js"></script>
39-
<script type="text/javascript" src="backbone-nested.js"></script>
46+
<!-- must loaded in this order -->
47+
<script type="text/javascript" src="/bower_components/jquery/jquery.js"></script>
48+
<script type="text/javascript" src="/bower_components/underscore/underscore.js"></script>
49+
<script type="text/javascript" src="/bower_components/backbone/backbone.js"></script>
50+
<script type="text/javascript" src="/bower_components/backbone-nested-model/backbone-nested.js"></script>
4051
```
4152

42-
2. Change your models to extend from `Backbone.NestedModel`, e.g.
53+
### Manual
54+
55+
Download the latest [release](https://github.com/afeld/backbone-nested/releases) and the dependencies listed above, then include with script tags in your HTML.
56+
57+
## Usage
58+
59+
1. Change your models to extend from `Backbone.NestedModel`, e.g.
4360

4461
```javascript
4562
var Person = Backbone.Model.extend({ ... });
@@ -49,7 +66,7 @@ user.bind('change:name.first', function(){ ... });
4966
var Person = Backbone.NestedModel.extend({ ... });
5067
```
5168

52-
3. Change your getters and setters to not access nested attributes directly, e.g.
69+
2. Change your getters and setters to not access nested attributes directly, e.g.
5370

5471
```javascript
5572
user.get('name').first = 'Bob';
@@ -167,3 +184,5 @@ Pull requests are more than welcome - please add tests, which can be run by open
167184

168185
$ npm install
169186
$ grunt
187+
188+
See also: [live tests](http://afeld.github.com/backbone-nested/test/) for latest release.

backbone-nested.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Backbone-Nested 1.1.2 - An extension of Backbone.js that keeps track of nested attributes
2+
* Backbone-Nested 2.0.0 - An extension of Backbone.js that keeps track of nested attributes
33
*
44
* http://afeld.github.com/backbone-nested/
55
*

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backbone-nested-model",
3-
"version": "1.1.2",
3+
"version": "2.0.0",
44
"dependencies": {
55
"backbone": ">=0.9.2"
66
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backbone-nested",
3-
"version": "1.1.2",
3+
"version": "2.0.0",
44
"description": "A plugin to make Backbone.js keep track of nested attributes.",
55
"scripts": {
66
"install": "bower install",

0 commit comments

Comments
 (0)