X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=blobdiff_plain;f=README.md;h=3d463de5e05271b78754ef2e86903112c74dc121;hp=8f86eec41a4ed0a2777cad6beff053544e29a54e;hb=4cff8737a670f1aeb0236d18d41bceeab4407db5;hpb=7690a6811179b10451ef828786160ab2e978ca86 diff --git a/README.md b/README.md index 8f86eec..3d463de 100644 --- 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("

foo

", {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 bar" Feedback, Questions, Etc