File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,23 @@ to make the same change in the parser.
16
16
However, it may still be useful to someone in production,
17
17
as it is intended to fully and completely match browser behavior
18
18
(at least, as much as the final spec does).
19
+
20
+ Using the Library
21
+ -----------------
22
+
23
+ The functionality is spread across two files for organizational purposes.
24
+ The tokenizer.js file comes first -
25
+ call the tokenize() function with a string containing CSS,
26
+ and it will return an array of CSS tokens.
27
+ parser.js comes next -
28
+ call parse() with an array of CSS tokens,
29
+ and it will return a stylesheet object
30
+ implementing a very simple tree of rules.
31
+
32
+ Node Integration
33
+ ----------------
34
+
35
+ Simon Sapin added some CommonJS export statements to the bottom of tokenizer.js and parser.js
36
+ exporting the tokenize and parse functions,
37
+ so as far as I know it will Just Work(tm).
38
+ I have no idea how to fix it if anything goes wrong, though.
You can’t perform that action at this time.
0 commit comments