Permalink
Browse files

Update README.md

  • Loading branch information...
1 parent b5c74b2 commit b5676e04a0b6c929819fbe56d5c77999fad5f5a1 @tabatkins committed Jul 19, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 README.md
View
@@ -16,3 +16,23 @@ to make the same change in the parser.
However, it may still be useful to someone in production,
as it is intended to fully and completely match browser behavior
(at least, as much as the final spec does).
+
+Using the Library
+-----------------
+
+The functionality is spread across two files for organizational purposes.
+The tokenizer.js file comes first -
+call the tokenize() function with a string containing CSS,
+and it will return an array of CSS tokens.
+parser.js comes next -
+call parse() with an array of CSS tokens,
+and it will return a stylesheet object
+implementing a very simple tree of rules.
+
+Node Integration
+----------------
+
+Simon Sapin added some CommonJS export statements to the bottom of tokenizer.js and parser.js
+exporting the tokenize and parse functions,
+so as far as I know it will Just Work(tm).
+I have no idea how to fix it if anything goes wrong, though.

0 comments on commit b5676e0

Please sign in to comment.