Skip to content

Commit

Permalink
update README with examples and build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
petermichaux committed May 15, 2012
1 parent 245b69b commit 5eccb7f
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Expand Up @@ -4,10 +4,30 @@ Abeja
A JavaScript library to create DOM structures from HTML strings.


Examples
--------

```abeja.parseHTML``` returns a DocumentFragment.

```javascript
var fragment = abeja.parseHTML('<div>alpha</div>');
fragment.firstChild.tagName; // 'DIV'
var fragment = abeja.parseHTML(' abc<span>beta</span>');
fragment.firstChild.nodeValue; // 'abc'
fragment.firstChild.nextSibling.tagName; // 'SPAN'
```


Status
------

Abeja is a new project and under construction.
Ready.


Browser Support
---------------

Tested working in IE6 and newer browsers by a variety of manufacturers.


Dependencies
Expand All @@ -16,6 +36,24 @@ Dependencies
None.


Build
-----

To build the production ready files, you need [JSMin](http://www.crockford.com/javascript/jsmin.html) or any other tool with the same command line interface. Then just type "make" at the command line and look in the build directory for the results.

For the record, this is how I installed JSMin. Note that I have /Users/peter/bin in my PATH.

```sh
$ cd ~/tmp
$ curl -O https://raw.github.com/douglascrockford/JSMin/master/jsmin.c
$ gcc -o jsmin jsmin.c
$ mv jsmin ~/bin
$ rm jsmin.c
$ which jsmin
/Users/peter/bin/jsmin
```


Tests
-----

Expand Down

0 comments on commit 5eccb7f

Please sign in to comment.