Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simple doc refresh, add licence & copyright info

  • Loading branch information...
commit 26fd35148c2f1022b373dac0c305a879ee692185 1 parent e785487
Rod Vagg rvagg authored
Showing with 127 additions and 30 deletions.
  1. +39 −0 LICENSE
  2. +1 −1  Makefile
  3. +87 −29 README.md
39 LICENSE
View
@@ -0,0 +1,39 @@
+Copyright 2012, Dustin Diaz (the "Original Author")
+All rights reserved.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Distributions of all or part of the Software intended to be used
+by the recipients as they would use the unmodified Software,
+containing modifications that substantially alter, remove, or
+disable functionality of the Software, outside of the documented
+configuration mechanisms provided by the Software, shall be
+modified such that the Original Author's bug reporting email
+addresses and urls are either replaced with the contact information
+of the parties responsible for the changes, or removed entirely.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+Except where noted, this license applies to any and all software
+programs and associated documentation files created by the
+Original Author, when distributed with the Software.
2  Makefile
View
@@ -1,2 +1,2 @@
boosh:
- smoosh make make/build.js
+ node_modules/smoosh/bin/smoosh make make/build.js
116 README.md
View
@@ -1,9 +1,11 @@
Bonzo
-----
-a library agnostic extensible DOM utility. Nothing else.
-Bonzo is designed to live in any host library, or simply as a stand-alone tool for the majority of your DOM-related tasks.
-<h3>It looks like this</h3>
+A library agnostic extensible DOM utility. Nothing else.
+
+Bonzo is designed to live in any host library, such as [Ender](http://ender.jit.su), or simply as a stand-alone tool for the majority of your DOM-related tasks.
+
+**It looks like this:**
``` js
bonzo(elements)
@@ -17,9 +19,27 @@ bonzo(elements)
.show()
```
-Paired with a Selector Engine
+--------------------------------------------------------
+
+ * <a href="#useselector"><b>Use with a selector engine</b></a>
+ * <a href="#extensions"><b>Bonzo extension API</b></a>
+ * <a href="#api"><b>Complete Bonzo API</b></a>
+ * <a href="#aboutname"><b>About the name "Bonzo"</b></a>
+ * Contributing:
+ - <a href="#building"><b>Building</b></a>
+ - <a href="#tests"><b>Tests</b></a>
+ * <a href="#browsers"><b>Browser support</b></a>
+ * <a href="#ender"><b>Ender integration</b></a>
+ * <a href="#contributors"><b>Contributors</b></a>
+ * <a href="#licence"><b>Licence & copyright</b></a>
+
+--------------------------------------------------------
+
+<a name="useselector"></a>
+Use with a selector engine
-----------------------------
-A great way to use Bonzo is with a selector engine (like [Qwery](https://github.com/ded/qwery) for example). You could wrap bonzo up and augment your wrapper to inherit the same methods. That looks like this:
+
+A great way to use Bonzo is with a selector engine, like [Qwery](https://github.com/ded/qwery). You could wrap Bonzo up and augment your wrapper to inherit the same methods:
``` js
function $(selector) {
@@ -33,9 +53,11 @@ This now allows you to write the following code:
$('#content a[rel~="bookmark"]').after('').css('text-decoration', 'none');
```
-Bonzo Extension API
+<a name="extensions"></a>
+Bonzo extension API
-------------------
-One of the greatest parts about Bonzo is its simplicity to hook into the internal chain to create custom methods. For example you can create a method called **color** like this:
+
+One of the greatest parts about Bonzo is its simplicity to hook into the internal chain to create custom methods. For example you can create a method called `color()` like this:
``` js
bonzo.aug({
@@ -48,8 +70,9 @@ bonzo.aug({
$('p').color('aqua')
```
-Bonzo Full API
----------------------
+<a name="api"></a>
+Complete Bonzo API
+------------------
* each(callback)
- callback (element, index)
@@ -138,55 +161,90 @@ Added in the Ender bridge
* width()
* height()
-Setting a query engine host
-------------------
-For the insertion methods you can set a query selector host (like [qwery](https://github.com/ded/qwery)).
+
+### Setting a query engine host
+
+For the insertion methods you can set a query selector host:
``` js
bonzo.setQueryEngine(qwery)
bonzo(bonzo.create('<div>')).insertAfter('.boosh a')
```
-The name Bonzo
---------------
-Bonzo Madrid was a malicious battle school commander of whom eventually is killed by [Ender Wiggin](http://en.wikipedia.org/wiki/Ender_Wiggin). Bonzo represents the DOM, of whom we'd all love to slay.
+<a name="aboutname"></a>
+About the name "Bonzo"
+----------------------
+*Bonzo Madrid* was a malicious battle school commander of whom eventually is killed by [Ender Wiggin](http://en.wikipedia.org/wiki/Ender_Wiggin). Bonzo represents the DOM, of whom we'd all love to slay.
-Building
---------
+<a name="contributing"></a>
+Contributing
+------------
- $ npm install -d
- $ make
+You should only edit the files in the *src/* directory. Bonzo is compiled into the *bonzo.js* and *bonzo.min.js* files contained in the root directory by the build command:
-Tests
------
+<a name="building"></a>
+### Building
+
+```sh
+$ npm install
+$ make
+```
- $ open tests/tests.html
+<a name="tests"></a>
+### Tests
+Point your test browser(s) to *tests/tests.html*, or:
+
+```sh
+$ open tests/tests.html
+```
+
+Please try to include tests or adjustments to existing tests with all non-trivial contributions.
+
+<a name="browsers"></a>
Browser support
---------------
+
* IE6+
* Chrome
* Safari 4+
- * Firefox 3+
+ * Firefox 3.5+
* Opera
+<a name="ender"></a>
Ender integration
-----------
-Bonzo is a registered npm package and fits in nicely with the [Ender](http://ender.no.de) framework. If you don't have Ender, you should install now, and never look back, ever. As a side note the *query engine host* is set for you when you include it with Ender.
+-----------------
+
+Bonzo is a registered npm package and fits in nicely with the [Ender](http://ender.no.de) framework. If you don't have Ender, you should install now, and never look back, *ever*. As a side note the *query engine host* is set for you when you include it with Ender.
- $ npm install ender -g
+```sh
+$ npm install ender -g
+```
To combine Bonzo to your Ender build, you can add it as such:
- $ ender build bonzo[,modb, modc,...]
+```sh
+$ ender build bonzo[ package-b[ package-c ...]]
+```
or, add it to your existing ender package
- $ ender add bonzo
+```sh
+$ ender add bonzo
+```
+
+Bonzo is included in [The Jeesh](http://ender.jit.su/#jeesh), Ender's "starter-pack", when you `ender build jeesh` you'll get Bonzo and some other amazing libraries that'll make working in the browser a breeze. See the [Ender documentation](http://ender.jit.su/) for more details.
+<a name="contributors"></a>
Contributors
------
+------------
* [Dustin Diaz](https://github.com/ded/bonzo/commits/master?author=ded)
* [Rod Vagg](https://github.com/ded/bonzo/commits/master?author=rvagg)
* [Jacob Thornton](https://github.com/ded/bonzo/commits/master?author=fat)
+
+<a name="licence"></a>
+Licence & copyright
+-------------------
+
+Bonzo is Copyright &copy; 2012 Dustin Diaz [@ded](https://twitter.com/ded) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
Please sign in to comment.
Something went wrong with that request. Please try again.