JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
update .gitignore
[peach-html5-editor.git] / README.md
index 8f86eec..b414c02 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,40 +16,54 @@ HTML5 parser: all (1581) tests pass. Works in the browser and node.js
 WYSIWYG editor: planning stages
 
 
-Getting Started
----------------
+Quick Start Guide
+-----------------
 
-Recommended: see "With CoffeeScript" below
+1.     Open ``test.html`` in your browser.
 
-(experimental) Alternate: see "Without Compiling"
+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.
 
-With CoffeeScript
-------------------
+4.     Try running the parser in the console, example:
 
-You can get CoffeeScript with a command such as this:
+               window.wheic.parse_html("<p>foo</p>", {fragment: "body"})
 
-       apt-get install coffeescript
+For further reading, see "Running Under node.js" below.
 
-or
 
-       npm install -g coffee-script
+Running Under node.js
+---------------------
 
+Dependancies: node.js, coffeescript
 
-Then, to test in the browser, run ``make``, then open ``index.html`` in your
-favorite browser.
+1.     Install node.js https://nodejs.org/en/
 
-Or, to run the tests on the commandline, run ``coffee test.coffee``
+2.     Install coffeescript. Try:
 
+               apt-get install coffeescript
+       or
 
-Without CoffeeScript
------------------
+               npm install -g coffee-script
+
+3.     You can run the tests directly from coffeescript:
+
+               coffee test.coffee
+
+4.     Compile to javascript:
+
+               make
+
+5.     Run tests via compiled code:
+
+               nodejs test.js
 
-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:
+5.     Try using the parser in your own code:
 
-       http://coffeescript.org/#scripts
+               var wheic = require('./parse-html.js');
+               var dom = wheic.parse_html("<p>hi</p>", {fragment: 'body'});
+               ...
 
 
 Feedback, Questions, Etc