JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
run in the browser without installing coffeescript
[peach-html5-editor.git] / README.md
index 111cd5d..3d463de 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,17 +4,41 @@ wheic
 This project is to build a HTML5 parser, then use that to build a WYSIWYG html
 editor for the browser.
 
+The code is written in CoffeeScript for modern browsers. The HTML5 parser can
+also run under node.js.
+
+
 Status
 ------
 
-Under development
+HTML5 parser: all (1581) tests pass. Works in the browser and node.js
+
+WYSIWYG editor: planning stages
+
+
+Quick Start Guide
+-----------------
+
+1.     Open ``test.html`` in your browser.
+
+2.     Open the console (right-click, inspect this element, console)
 
+3.     After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the
+       console.
 
-Getting Started
----------------
+4.     Try running the parser in the console, example:
 
-You'll need coffeescript, you can hopefully get that with a command such as
-this:
+               window.wheic.parse_html("<p>foo</p>", {fragment: "body"})
+
+For further reading, see "Running Under node.js" below.
+
+
+Running Under node.js
+---------------------
+
+Dependancies: node.js, coffeescript
+
+You can get CoffeeScript with a command such as this:
 
        apt-get install coffeescript
 
@@ -22,9 +46,14 @@ or
 
        npm install -g coffee-script
 
-Then run ``make``
+Now you can run the test suite like this:
+
+       coffee test.coffee
+
+Or use the parser from your own code:
 
-Then run the test suite by opening ``index.html`` in a modern browser.
+       wheic = require './parse-html.coffee'
+       dom = wheic.parse_html "foo <b>bar"
 
 
 Feedback, Questions, Etc