Quick Start Guide
-----------------
-1. Open ``test.html`` in your browser.
+1. Open ``parser_tests_coffee.html`` in your browser.
2. Open the console (right-click, inspect this element, console)
Running Under node.js
---------------------
-Dependancies: node.js, coffeescript
+Dependencies: node.js, CoffeeScript
1. Install node.js https://nodejs.org/en/
-2. Install coffeescript. Try:
+2. Install CoffeeScript. Try:
apt-get install coffeescript
or
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:
+Now you can do any of these things in any order:
+
+* Run the tests directly from CoffeeScript:
+
+ coffee test.coffee
+
+* Test the compiled (javascript) parser in your favorite browser by opening
+ up ``parser_tests.html`` and looking at the console.
+
+* Run tests via compiled code:
nodejs test.js
-5. Try using the parser in your own code:
+* Try using the parser in your own javascript node.js project:
var wheic = require('./parse-html.js');
var dom = wheic.parse_html("<p>hi</p>", {fragment: 'body'});
...
+* Try using the parser in your own CoffeeScript node.js project:
+
+ wheic = require './parse-html.js'
+ dom = wheic.parse_html "<p>hi</p>", fragment: 'body'
+ ...
+
+ Note: the CoffeeScript compile time is significant, so you'll want to use
+ the compiled javascript even though you could use the ``.coffee`` version.
+
Feedback, Questions, Etc
------------------------