Skip to content

Commit

Permalink
Updated Readme, fixed test file paths. Testacular/Karma tests still b…
Browse files Browse the repository at this point in the history
…roken.
  • Loading branch information
thirtified committed May 29, 2014
1 parent 79952a9 commit f0495ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bower_components
coverage
node_modules
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# Backbone.Advice #

Use requireJS to import - or whatever you want.
Use requireJS to import -- or whatever you want.

Based on the Advice functional mixin library by Angus Croll. Adds functional mixin abilities for Backbone objects.

There can be issues when extending classes that already have mixins and you may overrwrite needed functionality that has been mixed in. To get around this we use https://github.com/rhysbrettbowen/Backbone.AdviceFactory
There can be issues when extending classes that already have mixins and you may overrwrite needed functionality that has been mixed in. To get around this we use [Backbone.AdviceFactory](https://github.com/rhysbrettbowen/Backbone.AdviceFactory).

## Features ##

Gives a convenient way to add functionality as needed and reuse components together.

## Installation ##
### Bower
To install Backbone.Advice via [Bower](http://bower.io):

bower install backbone.advice

### From source
Download the [latest zip file](https://github.com/rhysbrettbowen/Backbone.Advice/archive/master.zip)
or clone the repository from GitHub:

git clone https://github.com/rhysbrettbowen/Backbone.Advice

## Usage ##

Advice and Mixins are provided for use with requirejs, if you'd just like to add them in with script tags then just remove the define function call.
Expand Down Expand Up @@ -73,7 +85,7 @@ var Speaker = Backbone.View.extend({
times: 3
});

var bob = new Speaker();
var bob = new Speaker();
bob.speak(); // Hello Bob
// for the 4th time

Expand Down Expand Up @@ -156,7 +168,13 @@ see Backbone.Advice.Mixins (mixin.js) for some useful mixins you can use today!

## Tests ##

to test open up test.html or run testacular with testacular.conf.js
Install dependencies

bundle install

and open the file `test.html` in your browser.

_TBD_: re-enable testing with testacular/karma.

#Changelog

Expand Down
8 changes: 4 additions & 4 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<script src="app/bower_components/chai/chai.js"></script>
<script src="app/bower_components/mocha/mocha.js"></script>
<script src="app/bower_components/requirejs/require.js"></script>
<link rel="stylesheet" href="app/bower_components/mocha/mocha.css" />
<script src="bower_components/chai/chai.js"></script>
<script src="bower_components/mocha/mocha.js"></script>
<script src="bower_components/requirejs/require.js"></script>
<link rel="stylesheet" href="bower_components/mocha/mocha.css" />

<script>
window.__karma__ = {start: function(){}};
Expand Down
8 changes: 4 additions & 4 deletions test/test-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require.config({
},

paths: {
'chai': 'app/bower_components/chai/chai',
'jquery': 'app/bower_components/jquery/jquery.min',
'underscore': 'app/bower_components/underscore/underscore',
'backbone': 'app/bower_components/backbone/backbone',
'chai': 'bower_components/chai/chai',
'jquery': 'bower_components/jquery/jquery.min',
'underscore': 'bower_components/underscore/underscore',
'backbone': 'bower_components/backbone/backbone',
'Backbone.Advice': 'advice',
'Mixin': 'mixin',
'test': 'test/test'
Expand Down

0 comments on commit f0495ed

Please sign in to comment.