JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
run in the browser without installing coffeescript
[peach-html5-editor.git] / README.md
index 8f86eec..3d463de 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,16 +16,27 @@ HTML5 parser: all (1581) tests pass. Works in the browser and node.js
 WYSIWYG editor: planning stages
 
 
-Getting Started
----------------
+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.
+
+4.     Try running the parser in the console, example:
 
-Recommended: see "With CoffeeScript" below
+               window.wheic.parse_html("<p>foo</p>", {fragment: "body"})
 
-(experimental) Alternate: see "Without Compiling"
+For further reading, see "Running Under node.js" below.
 
 
-With CoffeeScript
-------------------
+Running Under node.js
+---------------------
+
+Dependancies: node.js, coffeescript
 
 You can get CoffeeScript with a command such as this:
 
@@ -35,21 +46,14 @@ or
 
        npm install -g coffee-script
 
+Now you can run the test suite like this:
 
-Then, to test in the browser, run ``make``, then open ``index.html`` in your
-favorite browser.
-
-Or, to run the tests on the commandline, run ``coffee test.coffee``
-
-
-Without CoffeeScript
------------------
+       coffee test.coffee
 
-It is recommended to install CoffeeScript (see With CoffeeScript above), but it
-should be pretty easy to get your browser to compile the CoffeScript on the
-fly, to avoid installing anything. See the instructions here:
+Or use the parser from your own code:
 
-       http://coffeescript.org/#scripts
+       wheic = require './parse-html.coffee'
+       dom = wheic.parse_html "foo <b>bar"
 
 
 Feedback, Questions, Etc